-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 757 Bytes
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
ARG BASE_IMAGE=inseefrlab/onyxia-base
FROM $BASE_IMAGE
LABEL maintainer="InseeFrLab <innovation@insee.fr>"
ARG PYTHON_VERSION="3.14.4"
ENV PYTHON_VERSION=${PYTHON_VERSION}
# Install Python separately from system installation to avoid conflicts
ARG PYTHON_DIR="/opt/python"
ENV PATH="${PYTHON_DIR}/bin:${PATH}"
USER root
COPY --chmod=0755 scripts/ /opt/
COPY requirements.txt .
# Build Python from source
RUN /opt/install-python.sh && \
# Install Python packages
uv pip install --system --no-cache -r requirements.txt && \
# Install duckdb extensions
python /opt/install-duckdb-extensions.py && \
# Fix user permissions
/opt/fix-user-permissions.sh && \
# Clean
/opt/clean.sh requirements.txt
USER 1000
CMD ["python"]