-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile-base
31 lines (25 loc) · 1.29 KB
/
Dockerfile-base
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
FROM continuumio/miniconda:latest
# arguments
ARG ROOT_DIR=/genui
ARG BACKEND_DIR=./src/genui
ARG FRONTEND_DIR=./src/genui-gui
ARG DATA_DIR=./data
# environment variables
ENV GENUI_ROOT_DIR=${ROOT_DIR}
ENV GENUI_BACKEND_DIR=${ROOT_DIR}/${BACKEND_DIR}
ENV GENUI_FRONTEND_DIR=${ROOT_DIR}/${FRONTEND_DIR}
ENV GENUI_DATA_DIR=${ROOT_DIR}/${DATA_DIR}
ENV PYTHONUNBUFFERED 1
ENV DOCKER_CONTAINER 1
# authbind: to allow the app process to bind port 443 if run as nonroot
RUN apt-get install -y --no-install-recommends authbind
# wait-for-it: for the worker to wait until the backend is online
RUN apt-get install -y --no-install-recommends wait-for-it
# initialize the backend conda environment
COPY ${BACKEND_DIR}/environment.yml ${GENUI_BACKEND_DIR}/environment.yml
RUN conda env update -n base --file ${GENUI_BACKEND_DIR}/environment.yml && conda clean --all -y
# install the backend pip packages
COPY ${BACKEND_DIR}/requirements.txt ${GENUI_BACKEND_DIR}/requirements.txt
RUN pip install --no-cache-dir rdkit==2021.3.5 && pip install --no-cache-dir -r ${GENUI_BACKEND_DIR}/requirements.txt && pip3 install --no-cache-dir torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
# run updates
#RUN apt-get update && apt-get upgrade -y --no-install-recommends