Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
|
2 |
-
|
3 |
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
PATH=/opt/conda/bin:$PATH \
|
5 |
CUDA_HOME=/usr/local/cuda
|
@@ -13,22 +12,25 @@ RUN apt-get update && apt-get install -y \
|
|
13 |
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
|
14 |
bash /tmp/miniconda.sh -b -p /opt/conda && \
|
15 |
rm /tmp/miniconda.sh && \
|
16 |
-
|
17 |
|
18 |
-
#
|
19 |
-
RUN conda
|
20 |
-
|
|
|
21 |
|
22 |
-
#
|
23 |
-
RUN conda
|
|
|
24 |
|
25 |
-
# Copy
|
26 |
WORKDIR /workspace
|
27 |
COPY requirements.txt .
|
28 |
|
29 |
-
# Install Python dependencies (flash-attn will
|
30 |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
31 |
|
|
|
32 |
COPY . .
|
33 |
|
34 |
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]
|
|
|
1 |
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
|
|
|
2 |
ENV DEBIAN_FRONTEND=noninteractive \
|
3 |
PATH=/opt/conda/bin:$PATH \
|
4 |
CUDA_HOME=/usr/local/cuda
|
|
|
12 |
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
|
13 |
bash /tmp/miniconda.sh -b -p /opt/conda && \
|
14 |
rm /tmp/miniconda.sh && \
|
15 |
+
conda clean -afy
|
16 |
|
17 |
+
# Configure conda to avoid Anaconda TOS prompt
|
18 |
+
RUN conda config --remove channels defaults && \
|
19 |
+
conda config --add channels conda-forge && \
|
20 |
+
conda config --set channel_priority strict
|
21 |
|
22 |
+
# Create conda environment with Python + ffmpeg from conda-forge
|
23 |
+
RUN conda create -n appenv python=3.10 ffmpeg=7 -y && conda clean -afy
|
24 |
+
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
|
25 |
|
26 |
+
# Copy requirements first for layer caching
|
27 |
WORKDIR /workspace
|
28 |
COPY requirements.txt .
|
29 |
|
30 |
+
# Install Python dependencies (flash-attn will compile since we have nvcc)
|
31 |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
32 |
|
33 |
+
# Copy remaining code
|
34 |
COPY . .
|
35 |
|
36 |
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]
|