rajux75 commited on
Commit
8ccf21f
·
verified ·
1 Parent(s): 664f6ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,14 +1,19 @@
1
  # Dockerfile (Place in the root of your repo)
2
- FROM python:3.10-slim # Or a version compatible with your dependencies
 
 
 
3
 
4
  WORKDIR /code
5
 
6
  # Install system dependencies (like ffmpeg for imageio's mp4 writing)
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  ffmpeg \
9
- && rm -rf /var/lib/apt/lists/*
10
 
11
  COPY requirements.txt requirements.txt
 
12
  RUN pip install --no-cache-dir --upgrade pip && \
13
  pip install --no-cache-dir -r requirements.txt
14
 
 
1
  # Dockerfile (Place in the root of your repo)
2
+
3
+ # Use a specific Python version slim image for smaller size
4
+ # Or a version compatible with your dependencies
5
+ FROM python:3.10-slim
6
 
7
  WORKDIR /code
8
 
9
  # Install system dependencies (like ffmpeg for imageio's mp4 writing)
10
+ # Using --no-install-recommends helps keep the image smaller
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
12
  ffmpeg \
13
+ && apt-get clean && rm -rf /var/lib/apt/lists/* # Clean up apt cache
14
 
15
  COPY requirements.txt requirements.txt
16
+ # Use --no-cache-dir during pip install to reduce layer size
17
  RUN pip install --no-cache-dir --upgrade pip && \
18
  pip install --no-cache-dir -r requirements.txt
19