-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
92 lines (82 loc) · 3.53 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM frolvlad/alpine-glibc:alpine-3.10
# much of image code ripped from
# https://github.com/Docker-Hub-frolvlad/docker-alpine-miniconda3
# license for docker image content
RUN echo "\n\
The MIT License (MIT)\n\
\n\
Copyright (c) 2016 Vlad\n\
\n\
Permission is hereby granted, free of charge, to any person obtaining a copy\n\
of this software and associated documentation files (the \"Software\"), to deal\n\
in the Software without restriction, including without limitation the rights\n\
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\
copies of the Software, and to permit persons to whom the Software is\n\
furnished to do so, subject to the following conditions:\n\
\n\
The above copyright notice and this permission notice shall be included in all\n\
copies or substantial portions of the Software.\n\
\n\
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\
SOFTWARE." > BASE_IMAGE_LICENSE
LABEL maintainer="conda-forge core (@conda-forge/core)"
ENV LANG en_US.UTF-8
ARG CONDA_INSTALLER_VERSION="24.3.0-0"
ARG CONDA_INSTALLER_SHA256="23367676b610de826f50f7ddc91139a816d4b59bd4c69cc9b6082d9b2e7fe8a3"
ARG CONDA_DIR="/opt/conda"
ENV PATH="$CONDA_DIR/bin:$PATH"
ENV PYTHONDONTWRITEBYTECODE=1
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish
# Install conda
COPY conda-lock.yml /
RUN echo "**** install dev packages ****" && \
apk add --no-cache bash ca-certificates wget && \
rm -rf /var/cache/apk/* && \
\
echo "**** get Miniforge3 ****" && \
mkdir -p "$CONDA_DIR" && \
wget "https://github.com/conda-forge/miniforge/releases/download/$CONDA_INSTALLER_VERSION/Miniforge3-$CONDA_INSTALLER_VERSION-Linux-x86_64.sh" -O miniforge3.sh && \
echo "$CONDA_INSTALLER_SHA256 miniforge3.sh" | sha256sum -c && \
\
echo "**** install Miniforge3 ****" && \
bash miniforge3.sh -f -b -p "$CONDA_DIR" && \
rm -f miniforge3.sh && \
\
echo "**** install env ****" && \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate base && \
conda config --set show_channel_urls True && \
conda config --add channels conda-forge && \
conda config --show-sources && \
conda config --set always_yes yes && \
conda config --set solver libmamba && \
conda update --all --quiet && \
conda install --quiet conda-lock tini && \
conda-lock install -n webservices /conda-lock.yml && \
conda clean --all --force-pkgs-dirs --yes && \
find "$CONDA_DIR" -follow -type f \( -iname '*.a' -o -iname '*.pyc' -o -iname '*.js.map' \) -delete && \
\
echo "**** finalize ****" && \
mkdir -p "$CONDA_DIR/locks" && \
chmod 777 "$CONDA_DIR/locks"
COPY entrypoint /opt/docker/bin/entrypoint
RUN mkdir -p conda_forge_webservices
COPY / conda_forge_webservices/
RUN cd conda_forge_webservices && \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate webservices && \
pip install --no-deps --no-build-isolation -e .
CMD ["/opt/conda/bin/tini", \
"--", \
"/opt/docker/bin/entrypoint", \
"python", \
"-u", \
"-m", \
"conda_forge_webservices.webapp" \
]