-
Notifications
You must be signed in to change notification settings - Fork 244
/
Dockerfile-GPU
33 lines (23 loc) · 745 Bytes
/
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
30
31
32
33
FROM pytorch/pytorch:1.5-cuda10.1-cudnn7-devel
RUN apt-get update && apt-get install -y git
# Setup locales
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
WORKDIR /home/user
# Install apex
RUN git clone https://github.com/NVIDIA/apex \
&& cd apex \
&& pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
# Install FARM
COPY setup.py requirements.txt readme.rst /home/user/
RUN pip install -r requirements.txt
COPY farm farm
RUN pip install -e .
# Copy Training Scripts
COPY examples examples
CMD FLASK_APP=farm.inference_rest_api flask run --host 0.0.0.0