-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
29 lines (24 loc) · 1.09 KB
/
Dockerfile.gpu
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
FROM nvidia/cuda:10.2-cudnn8-runtime-ubuntu18.04
# install apt dependencies
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y gfortran python3.8 curl python3.8-distutils libpq-dev python3.8-dev tzdata
RUN ln -s /usr/bin/python3.8 /usr/bin/python
# install poetry and project dependencies
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3.8
COPY poetry.lock pyproject.toml /app/
WORKDIR /app
ENV PYTHONIOENCODING=utf-8
RUN /root/.poetry/bin/poetry env use python3.8
RUN /root/.poetry/bin/poetry install --no-dev --no-interaction
# copy work files
COPY . /app
# install native module
RUN apt-get update && \
apt-get install -y build-essential curl cmake && \
curl -sSf https://sh.rustup.rs | bash -s -- -y --profile minimal
ENV PATH="$HOME/.cargo/bin:$PATH"
RUN export PATH="$HOME/.cargo/bin:$PATH" && \
cd /app/mutation_prediction_native && \
/root/.poetry/bin/poetry run maturin develop --release
ENTRYPOINT ["/root/.poetry/bin/poetry", "run", "python"]