elungky commited on
Commit
ca59c13
·
1 Parent(s): 5fa8a70

Explicitly accept conda TOS in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -24,13 +24,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
  # Clean up apt cache to reduce image size
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
- # Install Miniconda:
28
- # 1. Download the Miniconda installer script.
29
- # 2. Run the installer in batch mode (-b) and specify the installation path (-p).
30
- # 3. Remove the installer script to save space.
31
- # 4. Clean Conda's package cache to further reduce image size.
32
- # 5. Configure Conda to not auto-activate the base environment on shell startup.
33
- # 6. Add the 'conda-forge' channel for broader package availability.
34
  RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
35
  /bin/bash miniconda.sh -b -p $CONDA_DIR && \
36
  rm miniconda.sh && \
@@ -38,6 +32,14 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86
38
  conda config --set auto_activate_base false && \
39
  conda config --add channels conda-forge
40
 
 
 
 
 
 
 
 
 
41
  # Copy all local project files into the container's working directory (/app).
42
  # This includes your cosmos-predict1.yaml, gui/requirements.txt, start.sh, etc.
43
  COPY . /app
 
24
  # Clean up apt cache to reduce image size
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
+ # Install Miniconda
 
 
 
 
 
 
28
  RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
29
  /bin/bash miniconda.sh -b -p $CONDA_DIR && \
30
  rm miniconda.sh && \
 
32
  conda config --set auto_activate_base false && \
33
  conda config --add channels conda-forge
34
 
35
+ # --- NEW: Accept Conda Terms of Service for default channels ---
36
+ # This is required for non-interactive environments like Docker builds.
37
+ # We source conda.sh first to make the 'conda' command available in this RUN layer.
38
+ RUN source $CONDA_DIR/etc/profile.d/conda.sh && \
39
+ conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
40
+ conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
41
+ # --- END NEW ---
42
+
43
  # Copy all local project files into the container's working directory (/app).
44
  # This includes your cosmos-predict1.yaml, gui/requirements.txt, start.sh, etc.
45
  COPY . /app