-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (45 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
57 lines (45 loc) · 1.32 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
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:24.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
VENV_PATH=/opt/venv \
PATH="/opt/venv/bin:$PATH"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
git \
jq \
sshpass \
curl \
&& rm -rf /var/lib/apt/lists/*
# Create and activate a virtual environment
RUN python3 -m venv $VENV_PATH
# Install packages in the virtual environment
RUN pip install --upgrade pip \
jupyterlab \
IM-client \
tabulate \
requests \
PyJWT \
hatch-jupyter-builder \
hatchling
# Install Node.js v22, Yarn globally and clean up APT cache
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /home/apricotlab/
# Install the Jupyter Notebook extension
RUN git clone https://github.com/grycap/apricotlab /home/apricotlab
# Install Node dependencies
RUN jlpm install
# Build the extension
RUN jlpm run build:prod
# Install Python package
RUN pip install -ve .
# Expose port 8888 (default port for Jupyter Lab)
EXPOSE 8888/tcp
# Start JupyterLab
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]