-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (38 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
47 lines (38 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3.12-slim
# Dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
wget \
ca-certificates \
libssl-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
libffi-dev \
zlib1g-dev \
curl \
git && \
rm -rf /var/lib/apt/lists/*
# Download and build Python 3.13 (with --disable-gil)
ENV PYTHON_VERSION=3.13.5
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz && \
tar -xf Python-${PYTHON_VERSION}.tar.xz && \
cd Python-${PYTHON_VERSION} && \
./configure --prefix=/usr/local --disable-gil --enable-optimizations --with-ensurepip=install && \
make -j"$(nproc)" && \
make altinstall && \
cd .. && rm -rf Python-${PYTHON_VERSION}*
# Install Python 3.12 packages
RUN pip install --no-cache-dir jupyterlab jupyterlab-deck numpy pandas numba pyarrow awkward pybind11
# Install Python 3.13 packages
RUN pip3.13 install --no-cache-dir numpy
# Set up the working directory
COPY notebooks/ /notebooks/
RUN chown -R root:root /notebooks/
# Expose Jupyter port
EXPOSE 8888
# Turn off Jupyter announcements
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
# Start Jupyter Lab
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--no-browser", "--notebook-dir=/notebooks", "--LabApp.default_url=/lab/tree/presentation.ipynb"]