forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.notebook
30 lines (22 loc) · 929 Bytes
/
Dockerfile.notebook
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
FROM nvcr.io/nvidia/tensorrt:20.09-py3
RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN apt-get update && apt-get install bazel-3.7.1
RUN ln -s /usr/bin/bazel-3.7.1 /usr/bin/bazel
RUN pip install pillow==4.3.0
RUN pip install torch==1.7.1
RUN pip install torchvision==0.8.2
RUN pip install notebook
COPY . /workspace/TRTorch
RUN rm /workspace/TRTorch/WORKSPACE
COPY ./notebooks/WORKSPACE.notebook /workspace/TRTorch/WORKSPACE
WORKDIR /workspace/TRTorch
RUN bazel build //:libtrtorch --compilation_mode opt
WORKDIR /workspace/TRTorch/py
# Locale is not set by default
RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN python3 setup.py install
WORKDIR /workspace/TRTorch/notebooks