-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile-builder
47 lines (39 loc) · 1.16 KB
/
Dockerfile-builder
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
ARG VERSION=3.8
FROM python:${VERSION}-bookworm
# Note that any deps installed here must also be installed in the
# github actions workflows:
#
# .github/workflows/python-package.yml
# .github/workflows/python-publish.yml
#
ENV DEBIAN_FRONTEND=noninteractive
RUN curl -fsSOL https://taskfile.dev/install.sh \
&& sh install.sh \
&& rm -f install.sh
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install -y --fix-missing \
nodejs \
libenchant-2-2 \
pandoc \
zip \
&& apt-get autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements-dev.txt /tmp/
RUN mkdir -p /tmp/docs
COPY docs/requirements.txt /tmp/docs/
RUN find /tmp -type f
COPY docs/notebooks/requirements.txt /tmp/docs/notebooks/
RUN find /tmp -type f
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install -U -r /tmp/requirements-dev.txt \
&& rm -f /tmp/requirements-dev.txt \
&& rm -f /tmp/requirements.txt \
&& rm -rf /tmp/docs
ENV USER=builder
ENV HOME=/home/${USER}
ENV PATH=${HOME}/.local/bin:${PATH}
RUN mkdir -p ${HOME}
WORKDIR ${HOME}