-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
42 lines (30 loc) · 1.56 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
RUN apt-get update
# silence tzdaata
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y tzdata
RUN dpkg-reconfigure --frontend noninteractive tzdata
RUN apt-get install -y libgl1 libglib2.0-0 gcc git python3.10 ffmpeg
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_ROOT_USER_ACTION=ignore
RUN python -m pip install --upgrade pip
RUN python -m pip install wheel setuptools
RUN pip install torch torchvision torchaudio
RUN pip install diffusers[torch] transformers accelerate scipy ftfy safetensors moviepy opencv-python sentencepiece peft
RUN pip install aiohttp concurrent-log-handler pydub controlnet_aux qrcode matplotlib PyWavelets
RUN pip install --no-deps invisible-watermark
RUN pip install git+https://github.com/suno-ai/bark.git@main
WORKDIR /sdaas
COPY ./ /sdaas
# this will be mounted as a bind point so the image can use the host's model files
RUN mkdir /root/.cache/huggingface/
ENV SDAAS_ROOT=/sdaas/
# these are the configurable settings for the worker
ENV SDAAS_TOKEN=
ENV SDAAS_URI=https://chiaswarm.ai
ENV SDAAS_WORKERNAME=dock_worker
CMD ["python", "-m", "swarm.worker"]
# docker build -t dkackman/chiaswarm .
# docker run -it --gpus all --mount type=bind,src=C:\Users\don\.cache\huggingface,target=/root/.cache/huggingface/ --env SDAAS_TOKEN=<YOUR TOKEN> dkackman/chiaswarm /bin/bash
# docker run --gpus all --mount type=bind,src=C:\Users\don\.cache\huggingface,target=/root/.cache/huggingface/ --env SDAAS_TOKEN=<YOUR TOKEN> dkackman/chiaswarm