Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +26 -25
Dockerfile
CHANGED
@@ -1,33 +1,34 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
TRANSFORMERS_CACHE=/app/hf_cache \
|
7 |
-
PIP_NO_CACHE_DIR=1 \
|
8 |
-
PYTHONDONTWRITEBYTECODE=1 \
|
9 |
-
PYTHONUNBUFFERED=1
|
10 |
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
-
#
|
14 |
-
RUN
|
15 |
-
|
16 |
-
|
|
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
|
25 |
-
#
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
#
|
30 |
-
|
31 |
-
EXPOSE 7860
|
32 |
|
33 |
-
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:12.1.105-cudnn8-devel-ubuntu22.04
|
2 |
|
3 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
+
PATH=/opt/conda/bin:$PATH \
|
5 |
+
CUDA_HOME=/usr/local/cuda
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
wget git libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg build-essential \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
+
# Install Miniconda
|
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 |
+
/opt/conda/bin/conda clean -afy
|
17 |
|
18 |
+
# Create conda env
|
19 |
+
RUN conda create -n appenv python=3.10 -y && conda clean -afy
|
20 |
+
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
|
21 |
|
22 |
+
# Install ffmpeg from conda-forge
|
23 |
+
RUN conda install ffmpeg=7 -c conda-forge -y && conda clean -afy
|
24 |
|
25 |
+
# Copy project
|
26 |
+
WORKDIR /workspace
|
27 |
+
COPY requirements.txt .
|
28 |
|
29 |
+
# Install Python dependencies (flash-attn will now compile)
|
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", "app.py"]
|