Skip to content

Commit cf8204b

Browse files
committed
Datascience image install libraires to venv
1 parent 0af4ece commit cf8204b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

python/datascience/Dockerfile.datascience

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ RUN if [ "$(printf '%s\n' "$PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.1
1515
mv "requirements-below-3.11.txt" "requirements.txt" \
1616
; fi
1717

18-
# Install dependencies
19-
# Combine all RUN commands into one to minimize the number of layers
20-
RUN apt-get update \
21-
&& apt-get install -y --no-install-recommends gcc \
22-
&& pip install --upgrade pip setuptools wheel \
23-
&& pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt \
24-
&& apt-get purge -y gcc \
25-
&& apt-get autoremove -y \
26-
&& apt-get clean \
27-
&& rm -rf /var/lib/apt/lists/* /root/.cache
18+
19+
RUN python -m venv --system-site-packages ~/venv
20+
RUN . ~/venv/bin/activate \
21+
&& pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt

0 commit comments

Comments
 (0)