diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d749aa9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM nvidia/cuda:11.6.0-base-ubuntu20.04 +RUN apt-get update && apt-get install python3 python3-pip -y + +RUN pip3 install --upgrade diffusers transformers scipy python-dotenv cuda-python && \ + pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 && \ + pip install torch==1.11.0+cu115 torchvision==0.12.0+cu115 torchaudio==0.11.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html + +WORKDIR /app + +COPY main.py /app/main.py +VOLUME /root/.cache/huggingface/diffusers/ + + +CMD [ "python3", "main.py" ] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..7db62e2 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +version: '3.9' + +services: + app: + image: stablediffusion + build: . + runtime: nvidia + env_file: + - .env + volumes: + - ./images:/images \ No newline at end of file