forked from mw10178/202211-mw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 1.08 KB
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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
# install updates
RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y install wget vim git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install Miniconda3
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/Miniconda3-latest-Linux-x86_64.sh &&\
chmod +x /tmp/Miniconda3-latest-Linux-x86_64.sh && \
/tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3 && \
rm /tmp/Miniconda3-latest-Linux-x86_64.sh
ENV PATH /opt/miniconda3/bin:$PATH
# update base environment
RUN conda update --yes --all && conda clean --yes --tarballs
COPY conda_environment.yml /tmp/conda_environment.yml
# setup ctplot environment
RUN conda env create -f /tmp/conda_environment.yml && \
rm /tmp/conda_environment.yml
# install application
WORKDIR /app
COPY . .
# install ctplot package
RUN conda run -n ctplot --no-capture-output pip install .
WORKDIR /
CMD conda run -n ctplot --no-capture-output python /app/ctplot/webserver.py