Skip to content

Commit 0d36e96

Browse files
committed
Split python 3.11 and 3.12 requirments
1 parent 614c515 commit 0d36e96

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

python/datascience/Dockerfile.datascience

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ ARG CIRCLE_PULL_REQUEST
33
FROM deepnote/python:${PYTHON_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}
44

55
# Add the requirements files
6-
ADD requirements-3.11+.txt /requirements-3.11+.txt
6+
ADD requirements-3.11.txt /requirements-3.11.txt
7+
ADD requirements-3.12.txt /requirements-3.12.txt
78
ADD requirements-below-3.11.txt /requirements-below-3.11.txt
89

910
#Determine the Python version and set the version-specifications file
1011
ARG PYTHON_VERSION
1112

12-
RUN if [ "$(printf '%s\n' "$PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.11" ]; then \
13-
mv "requirements-3.11+.txt" "requirements.txt" \
13+
RUN if [ "$(printf '%s\n' "$PYTHON_VERSION" "3.12" | sort -V | head -n1)" = "3.12" ]; then \
14+
mv /requirements-3.12.txt /requirements.txt \
15+
; elif [ "$(printf '%s\n' "$PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.11" ]; then \
16+
mv /requirements-3.11.txt /requirements.txt \
1417
; else \
15-
mv "requirements-below-3.11.txt" "requirements.txt" \
18+
mv /requirements-below-3.11.txt /requirements.txt \
1619
; fi
1720

18-
1921
RUN python -m venv --system-site-packages ~/venv
2022
RUN . ~/venv/bin/activate \
2123
&& pip install --no-cache-dir -r requirements.txt -c https://deepnote-staging-runtime-artifactory.s3.us-east-1.amazonaws.com/deepnote-toolkit/b41caa1/constraints${PYTHON_VERSION}.txt
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Requirements for Python 3.12
2+
# Package versions use '<=' to specify maximum compatible versions
3+
# This prevents unexpected breaking changes while allowing installation
4+
# of the latest compatible version within the specified constraints
5+
scipy<=1.15.2
6+
matplotlib<=3.10.0
7+
scikit-learn<=1.6.0
8+
agate<=1.13.0
9+
keras<=3.9.0
10+
nltk<=3.9.0
11+
spacy<=3.8.0
12+
seaborn<=0.13.1
13+
scrapy<=2.11.0
14+
jsonify==0.5
15+
datascience>=0.17,<1
16+
textblob<=0.19.0
17+
tabulate<=0.9.0
18+
sympy<=1.14.0
19+
squarify<=0.4.3
20+
tensorflow>=2.15,<3
21+
torch<=2.7.0
22+
torchvision<=0.17.0
23+
snowflake-snowpark-python<=1.31.0
24+
geopandas<=1.0.0

0 commit comments

Comments
 (0)