Skip to content

Commit 9982ecd

Browse files
committed
move Python package installations to requirements file
1 parent 93eae5e commit 9982ecd

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

Dockerfile

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,14 @@ RUN apt-get update -qq && apt-get install -y \
1818
# Dependencies for OpenCV
1919
RUN apt-get install -y libgl1
2020

21-
# Install additional Python packages
22-
RUN pip3 install --no-cache-dir \
23-
flask_sqlalchemy \
24-
numpy \
25-
pandas \
26-
passlib \
27-
plotly \
28-
pytz \
29-
cachelib \
30-
cffi \
31-
inflect \
32-
emoji \
33-
pyfiglet \
34-
multipledispatch \
35-
Pillow==10.4.0 \
36-
tabulate \
37-
validators \
38-
validator-collection \
39-
fpdf2==2.8.2
40-
41-
# Install ML packages for CS50 AI
42-
RUN pip3 install --no-cache-dir \
43-
nltk \
44-
opencv-python \
45-
scikit-learn \
46-
tf-nightly \
47-
transformers==4.35.0
21+
# Install Python packages from requirements file
22+
COPY dependencies/python/requirements.txt /tmp/requirements.txt
23+
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt && \
24+
rm /tmp/requirements.txt
4825

4926
# Install nltk data
5027
RUN python3 -c "import nltk; nltk.download('punkt_tab', download_dir='/usr/share/nltk_data/')"
5128

52-
# Install CS50 Python packages
53-
RUN pip3 install cs50 --upgrade --no-cache-dir
54-
5529
# Install R and dependencies for tidyverse library
5630
RUN apt-get update -qq && apt-get install -y \
5731
automake \
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Additional Python packages
2+
cachelib==0.13.0
3+
cffi==1.17.1
4+
emoji==2.14.1
5+
Flask-SQLAlchemy==3.1.1
6+
fpdf2==2.8.3
7+
inflect==7.5.0
8+
multipledispatch==1.0.0
9+
numpy==2.3.2
10+
pandas==2.3.1
11+
passlib==1.7.4
12+
Pillow==11.3.0
13+
plotly==6.2.0
14+
pyfiglet==1.0.3
15+
pytz==2025.2
16+
tabulate==0.9.0
17+
validator-collection==1.5.0
18+
validators==0.35.0
19+
20+
# ML packages for CS50 AI
21+
nltk==3.9.1
22+
opencv-python
23+
scikit-learn==1.7.1
24+
tf-nightly==2.21.0.dev20250801
25+
tf-keras
26+
transformers==4.35.0
27+
28+
# CS50 Python packages
29+
cs50==9.4.0

0 commit comments

Comments
 (0)