Skip to content

Commit bb996f1

Browse files
committed
optimize python dockerfile to be much lighter
1 parent ba1a79e commit bb996f1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Dockerfile.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM jupyter/base-notebook
1+
FROM python:3.10-slim
22

3-
USER root
4-
RUN apt-get update && apt-get install -y build-essential g++ libgl1-mesa-glx libx11-6
5-
COPY requirements.txt .
6-
RUN pip install -r requirements.txt
7-
COPY . /src
83
WORKDIR /src
4+
RUN apt-get update && apt-get install -y build-essential g++ libgl1-mesa-glx libx11-6 && rm -rf /var/lib/apt/lists/*
5+
COPY requirements.txt .
6+
RUN pip install --no-cache-dir -r requirements.txt
7+
COPY . .
98

0 commit comments

Comments
 (0)