ashleykleynhans / instantstyle-docker

Docker image for InstantStyle : Free Lunch towards Style-Preserving in Text-to-Image Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker image for InstantStyle : Free Lunch towards Style-Preserving in Text-to-Image Generation

Docker Pulls Template Version

Installs

Available on RunPod

This image is designed to work on RunPod. You can use my custom RunPod template to launch it on RunPod.

Building the Docker image

Note

You will need to edit the docker-bake.hcl file and update REGISTRY_USER, and RELEASE. You can obviously edit the other values too, but these are the most important ones.

# Clone the repo
git clone https://github.com/ashleykleynhans/instantstyle-docker.git

# Log in to Docker Hub
docker login

# Build the image, tag the image, and push the image to Docker Hub
cd instantstyle-docker
docker buildx bake -f docker-bake.hcl --push

# Same as above but customize registry/user/release:
REGISTRY=ghcr.io REGISTRY_USER=myuser RELEASE=my-release docker buildx \
    bake -f docker-bake.hcl --push

Running Locally

Install Nvidia CUDA Driver

Start the Docker container

docker run -d \
  --gpus all \
  -v /workspace \
  -p 3000:3001 \
  -p 8888:8888 \
  -p 2999:2999 \
  -e VENV_PATH=/workspace/venvs/instantstyle \
  ashleykza/instantstyle:latest

You can obviously substitute the image name and tag with your own.

Ports

Connect Port Internal Port Description
3000 3001 InstantStyle
8888 8888 Jupyter Lab
2999 2999 RunPod File Uploader

Environment Variables

Variable Description Default
VENV_PATH Set the path for the Python venv for the app /workspace/venvs/instantstyle
JUPYTER_LAB_PASSWORD Set a password for Jupyter lab not set - no password
DISABLE_AUTOLAUNCH Disable InstantStyle from launching automatically (not set)
DISABLE_SYNC Disable syncing if using a RunPod network volume (not set)

Logs

InstantStyle creates a log file, and you can tail the log instead of killing the service to view the logs.

Application Log file
InstantStyle /workspace/logs/InstantStyle.log

For example:

tail -f /workspace/logs/InstantStyle.log

Community and Contributing

Pull requests and issues on GitHub are welcome. Bug fixes and new features are encouraged.

Appreciate my work?

Buy Me A Coffee

About

Docker image for InstantStyle : Free Lunch towards Style-Preserving in Text-to-Image Generation

License:GNU General Public License v3.0


Languages

Language:Shell 33.3%Language:Python 31.2%Language:Dockerfile 21.3%Language:HCL 14.2%