-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
28 lines (22 loc) · 885 Bytes
/
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
ARG BASE_IMAGE=nvcr.io/nvidia/cuda:12.1.0-runtime-ubuntu22.04
FROM ${BASE_IMAGE}
# https://ngc.nvidia.com/catalog/containers/nvidia:cuda
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Amsterdam \
PYTHONUNBUFFERED=1 \
JOBLIB_TEMP_FOLDER=/app/data/tmp
# ^fixes no space left on device error
WORKDIR /app
# CUDA image required to install python
RUN apt-get update && \
apt-get install -y vim python3-dev python3-venv python3-pip curl wget unzip git && \
ln -s /usr/bin/python3 /usr/bin/python && \
# wget https://bootstrap.pypa.io/get-pip.py && \
# python3 get-pip.py && \
# rm get-pip.py && \
pip3 install --upgrade pip
ADD requirements.txt .
RUN pip3 install -r requirements.txt
ADD . .
RUN pip3 install -e .
CMD [ "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000", "--workers", "4", "src.predict_drug_target.api:app" ]