-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (46 loc) · 1.5 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
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - Paul Nilsson, [email protected], 2021-2023
ARG BASE_CONTAINER=condaforge/mambaforge:latest
FROM $BASE_CONTAINER
MAINTAINER Paul Nilsson
USER root
# Tag for selecting the dask version
ARG DASK_VERSION
# Tag for selecting a package to be pip installed (e.g. dask-ml[complete])
ARG PACKAGE
ARG python=3.10.6
ARG release
SHELL ["/bin/bash", "-c"]
ENV PATH /opt/conda/bin:$PATH
ENV PYTHON_VERSION=${python}
RUN mamba install -y \
"mamba>=0.27.0" \
python=${PYTHON_VERSION} \
nomkl \
cmake \
dask=$DASK_VERSION \
cachey \
streamz \
numpy=1.24.4 \
tornado=6.3.2 \
root=6.28 \
&& mamba clean -tipy \
&& find /opt/conda/ -type f,l -name '*.a' -delete \
&& find /opt/conda/ -type f,l -name '*.pyc' -delete \
&& find /opt/conda/ -type f,l -name '*.js.map' -delete \
&& find /opt/conda/lib/python*/site-packages/bokeh/server/static -type f,l -name '*.js' -not -name '*.min.js' -delete \
&& rm -rf /opt/conda/pkgs
COPY prepare.sh /usr/bin/prepare.sh
RUN mkdir /opt/app
# Activate the environment, and make sure it's activated:
RUN conda init bash
COPY environment.yml /opt/app/.
RUN conda env create -f /opt/app/environment.yml
RUN activate myenv
RUN chmod +x /usr/bin/prepare.sh
ENTRYPOINT ["tini", "-g", "--", "/usr/bin/prepare.sh"]