- Ubuntu 22.04 LTS
- CUDA 11.8
- Python 3.10.12
- Torch 2.1.2
- xformers 0.0.23.post1
- Jupyter Lab
- Kohya_ss v24.0.6
- runpodctl
- OhMyRunPod
- RunPod File Uploader
- rclone
- Application Manager
- sd_xl_base_1.0.safetensors
This image is designed to work on RunPod. You can use my custom RunPod template to launch it on RunPod.
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/kohya-docker.git
# Download the models
cd kohya-docker
wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
# Log in to Docker Hub
docker login
# Build the image, tag the image, and push the image to Docker Hub
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
docker run -d \
--gpus all \
-v /workspace \
-p 3000:3001 \
-p 8000:8000 \
-p 8888:8888 \
-p 2999:2999 \
ashleykza/kohya:latest
You can obviously substitute the image name and tag with your own.
Connect Port | Internal Port | Description |
---|---|---|
3000 | 3001 | Kohya_ss |
8000 | 8000 | Application Manager |
8888 | 8888 | Jupyter Lab |
2999 | 2999 | RunPod File Uploader |
Variable | Description | Default |
---|---|---|
JUPYTER_LAB_PASSWORD | Set a password for Jupyter lab | not set - no password |
DISABLE_AUTOLAUNCH | Disable Kohya_ss from launching automatically | (not set) |
Kohya_ss creates a log file, and you can tail the log instead of killing the service to view the logs.
Application | Log file |
---|---|
Kohya_ss | /workspace/logs/kohya_ss.log |
For example:
tail -f /workspace/logs/kohya_ss.log
- RunPod for providing most of the container code.
- Bernard Maltais (core developer of Kohya_ss) for assisting with optimizing the Docker image.
Pull requests and issues on GitHub are welcome. Bug fixes and new features are encouraged.