-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdockerfile
More file actions
31 lines (20 loc) · 1.06 KB
/
dockerfile
File metadata and controls
31 lines (20 loc) · 1.06 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
# Stage 1: Build the OpenAVMKit package and install dependencies
FROM python:3.11 AS builder
WORKDIR /app
# Copy all of OpenAVMKit's build files into the container (excluding those in .dockerignore)
COPY . ./
# Ensure that the entrypoint script is executable
RUN chmod +x ./simple-entrypoint.sh
# --no-cache-dir is used to avoid caching packages, shrinking the image size
RUN pip install --no-cache-dir -r requirements.txt
# Install local openavmkit package
RUN pip install .
# Seperately install jupyter (as specified on the openavmkit docs)
RUN pip install jupyter
# Stage 2: Muve the built/installed packages into a distroless environment
# Install and register a standard Python kernel for Jupyter
RUN python -m ipykernel install --user --name=python3 --display-name="Python 3 (Project)"
ENTRYPOINT ["./simple-entrypoint.sh"]
LABEL maintainer="Jackson Arnold <jackson.n.arnold@gmail.com>"
# Future updates:
# - Create all the dependencies in a distro environment, then move it to a distroless with the root file being /notebooks/ (no need for anything outside of that)