-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathDockerfile
69 lines (57 loc) · 1.92 KB
/
Dockerfile
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
58
59
60
61
62
63
64
65
66
67
68
69
ARG PLATFORM=linux/x86_64
ARG BASE_IMAGE=python:3.12.8-slim
# This is the primary build target used for the production image
FROM --platform=$PLATFORM $BASE_IMAGE AS production
# Disable pip warnings https://stackoverflow.com/a/72551258
ENV PIP_ROOT_USER_ACTION=ignore
LABEL [email protected]
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y --no-install-recommends && \
apt-get install -y --no-install-recommends locales && \
locale-gen en_US.UTF-8 && \
apt-get install -y --no-install-recommends software-properties-common && \
apt-get install -y --no-install-recommends \
make \
automake \
libpq-dev \
libffi-dev \
gfortran \
g++ \
git \
libboost-program-options-dev \
libtool \
libxrender1 \
wget \
ca-certificates \
curl \
mandoc \
unzip && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
COPY requirements-full.txt .
RUN pip install --progress-bar off --no-cache-dir -r requirements-full.txt && \
rm requirements-full.txt
# Install uv.
ADD https://astral.sh/uv/0.5.18/install.sh /uv-installer.sh
RUN sh /uv-installer.sh && rm /uv-installer.sh
ENV PATH="/root/.local/bin/:$PATH" \
UV_SYSTEM_PYTHON=1
# Instruct joblib to use disk for temporary files. Joblib defaults to
# /shm when that directory is present. In the Docker container, /shm is
# present but defaults to 64 MB.
# https://github.com/joblib/joblib/blob/0.11/joblib/parallel.py#L328L342
ENV JOBLIB_TEMP_FOLDER=/tmp
ENV VERSION=8.2.0 \
VERSION_MAJOR=8 \
VERSION_MINOR=2 \
VERSION_MICRO=0
# This build target is for testing in CircleCI.
FROM --platform=$PLATFORM production AS test
COPY .circleci/test_image.py .
COPY CHANGELOG.md .
# This build target is for updating dependencies.
# See generate-requirements.full.sh.
FROM --platform=$PLATFORM $BASE_IMAGE AS pip-tools
RUN pip install -U --no-cache-dir pip pip-tools --progress-bar off
CMD ["/bin/bash"]
# Default to the production build target.
FROM production