Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +17 -10
Dockerfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
|
2 |
# Non-interactive APT installs
|
|
|
3 |
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
PATH=/opt/conda/bin:$PATH \
|
5 |
CUDA_HOME=/usr/local/cuda
|
6 |
|
7 |
-
# Install system
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget git build-essential \
|
10 |
libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg \
|
@@ -16,25 +17,31 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86
|
|
16 |
rm /tmp/miniconda.sh && \
|
17 |
conda clean -afy
|
18 |
|
19 |
-
# Remove ALL Anaconda default channels
|
20 |
-
RUN
|
21 |
-
conda config --remove channels
|
22 |
-
conda config --remove channels
|
|
|
|
|
23 |
conda config --add channels conda-forge && \
|
24 |
conda config --set channel_priority strict
|
25 |
|
26 |
-
#
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
|
29 |
|
30 |
-
# Copy requirements
|
31 |
WORKDIR /workspace
|
32 |
COPY requirements.txt .
|
33 |
|
34 |
-
# Install
|
35 |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
36 |
|
37 |
-
# Copy rest of
|
38 |
COPY . .
|
39 |
|
40 |
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]
|
|
|
1 |
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
|
2 |
# Non-interactive APT installs
|
3 |
+
# Avoid any apt interactive prompts
|
4 |
ENV DEBIAN_FRONTEND=noninteractive \
|
5 |
PATH=/opt/conda/bin:$PATH \
|
6 |
CUDA_HOME=/usr/local/cuda
|
7 |
|
8 |
+
# Install system packages
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
wget git build-essential \
|
11 |
libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg \
|
|
|
17 |
rm /tmp/miniconda.sh && \
|
18 |
conda clean -afy
|
19 |
|
20 |
+
# Remove ALL Anaconda default channels (system + user configs)
|
21 |
+
RUN rm -f /opt/conda/.condarc && \
|
22 |
+
conda config --system --remove-key channels || true && \
|
23 |
+
conda config --remove-key channels || true && \
|
24 |
+
conda config --system --add channels conda-forge && \
|
25 |
+
conda config --system --set channel_priority strict && \
|
26 |
conda config --add channels conda-forge && \
|
27 |
conda config --set channel_priority strict
|
28 |
|
29 |
+
# This prevents Conda from auto-adding defaults during env creation
|
30 |
+
ENV CONDA_FORGE=1 \
|
31 |
+
CONDA_AUTO_UPDATE_CONDA=false
|
32 |
+
|
33 |
+
# Create environment using ONLY conda-forge
|
34 |
+
RUN conda create --override-channels -n appenv -c conda-forge python=3.10 ffmpeg=7 -y && conda clean -afy
|
35 |
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
|
36 |
|
37 |
+
# Copy requirements
|
38 |
WORKDIR /workspace
|
39 |
COPY requirements.txt .
|
40 |
|
41 |
+
# Install pip dependencies
|
42 |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
43 |
|
44 |
+
# Copy rest of code
|
45 |
COPY . .
|
46 |
|
47 |
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]
|