Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +15 -32
Dockerfile
CHANGED
|
@@ -1,41 +1,24 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY . .
|
| 6 |
|
| 7 |
-
RUN
|
| 8 |
-
RUN apt-get install -y python3.10 python3.10-dev python3.10-distutils && \
|
| 9 |
-
ln -sf /usr/bin/python3.10 /usr/bin/python3 && \
|
| 10 |
-
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
|
| 11 |
|
| 12 |
-
RUN pip install --no-cache-dir
|
| 13 |
-
pip install --no-cache-dir \
|
| 14 |
-
"git+https://github.com/huggingface/diffusers.git@main#egg=diffusers" && \
|
| 15 |
-
pip install --no-cache-dir --prefer-binary \
|
| 16 |
-
transformers \
|
| 17 |
-
accelerate \
|
| 18 |
-
safetensors \
|
| 19 |
-
opencv-python \
|
| 20 |
-
datasets \
|
| 21 |
-
dataclasses \
|
| 22 |
-
scikit-learn \
|
| 23 |
-
huggingface-hub \
|
| 24 |
-
tensorboard \
|
| 25 |
-
peft \
|
| 26 |
-
ftfy \
|
| 27 |
-
jinja2 \
|
| 28 |
-
torchvision \
|
| 29 |
-
bitsandbytes \
|
| 30 |
-
torch \
|
| 31 |
-
--extra-index-url https://download.pytorch.org/whl/cu121 && \
|
| 32 |
-
pip install --no-cache-dir \
|
| 33 |
"https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.11/flash_attn-2.8.0+cu121torch2.4-cp310-cp310-linux_x86_64.whl"
|
| 34 |
|
| 35 |
-
RUN
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
-
RUN
|
| 40 |
|
| 41 |
-
CMD
|
|
|
|
| 1 |
+
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
|
| 2 |
|
| 3 |
+
RUN apt-get update && \
|
| 4 |
+
apt-get install -y python3.10 python3.10-dev python3.10-distutils curl git && \
|
| 5 |
+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
|
| 6 |
+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
|
| 7 |
|
| 8 |
+
RUN python3 -m pip install --upgrade pip
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
COPY . .
|
| 12 |
|
| 13 |
+
RUN pip install --no-cache-dir torch==2.4.0+cu123 torchvision==0.19.0 --extra-index-url https://download.pytorch.org/whl/cu121
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
RUN pip install --no-cache-dir \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
"https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.11/flash_attn-2.8.0+cu121torch2.4-cp310-cp310-linux_x86_64.whl"
|
| 17 |
|
| 18 |
+
RUN pip install --no-cache-dir \
|
| 19 |
+
diffusers transformers accelerate safetensors opencv-python datasets dataclasses \
|
| 20 |
+
scikit-learn huggingface-hub tensorboard peft ftfy jinja2 bitsandbytes
|
| 21 |
|
| 22 |
+
RUN mkdir /.cache && chmod 777 /.cache && chmod 777 /app
|
| 23 |
|
| 24 |
+
CMD ["python3", "train.py"]
|