Skip to content

Commit 476a8c3

Browse files
[update] Update 'Dockerfile'
1 parent c84f844 commit 476a8c3

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# FROM pytorch/pytorch:latest
2-
FROM nvcr.io/nvidia/pytorch:19.04-py3
3-
MAINTAINER ShigemichiMatsuzaki <matsuzaki@aisl.cs.tut.ac.jp>
2+
#FROM nvcr.io/nvidia/pytorch:19.04-py3
3+
FROM nvcr.io/nvidia/pytorch:20.03-py3
44

55
WORKDIR /workspace
6-
COPY requirements.txt /tmp
6+
# avoid blocking in installation of tzdata
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
#COPY requirements.txt /tmp
79

8-
RUN pip install -r /tmp/requirements.txt && rm -rf /tmp/requirements.txt
10+
#RUN pip install -r /tmp/requirements.txt && rm -rf /tmp/requirements.txt
911

1012
RUN apt-get update && apt install -y lsb-release net-tools \
1113
&& apt-get clean \
@@ -17,10 +19,10 @@ RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main"
1719
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
1820

1921
RUN apt update && \
20-
apt install -y ros-kinetic-ros-base \
21-
ros-kinetic-image-transport \
22-
ros-kinetic-image-transport-plugins \
23-
python-catkin-tools \
22+
apt install -y ros-melodic-ros-base \
23+
ros-melodic-image-transport \
24+
ros-melodic-image-transport-plugins \
25+
python-catkin-tools python-rosdep\
2426
&& apt-get clean \
2527
&& rm -rf /var/lib/apt/lists/*rm
2628

@@ -30,12 +32,12 @@ RUN rosdep init && rosdep update
3032
# Set entry point
3133
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
3234
RUN chmod 777 /ros_entrypoint.sh
33-
RUN echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
35+
RUN echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
3436

3537
# Set environment variables
36-
ENV PATH /opt/ros/kinetic/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
37-
ENV PYTHONPATH /opt/ros/kinetic/lib/python2.7/dist-packages:$PYTHONPATH
38-
ENV ROS_DISTRO kinetic
38+
ENV PATH /opt/ros/melodic/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
39+
ENV PYTHONPATH /opt/ros/melodic/lib/python2.7/dist-packages:$PYTHONPATH
40+
ENV ROS_DISTRO melodic
3941

4042
# Install LibTorch, a C++ API of PyTorch
4143
# - Following the instruction in https://github.com/pytorch/pytorch/blob/master/docs/libtorch.rst

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME=aisl/pytorch-enet
2-
VERSION=latest
2+
VERSION=20.03-py3
33
CONTAINER_NAME=pytorch-enet
44

55
build :

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "2.3"
22
services:
33
pytorch-train:
44
container_name: pytorch-train
5-
image: aisl/pytorch-enet:latest
5+
image: aisl/pytorch-enet:20.03-py3
66
runtime: nvidia
77
build: .
88
command: >
@@ -41,7 +41,7 @@ services:
4141
- master
4242
build: .
4343
runtime: nvidia
44-
image: aisl/pytorch-enet:latest
44+
image: aisl/pytorch-enet:20.03-py3
4545
command: roslaunch pytorch_enet_ros pytorch_enet_ros.launch
4646
environment:
4747
- ROS_MASTER_URI=http://pytorch-ros-master:11311
@@ -57,10 +57,10 @@ services:
5757
container_name: catkin-build
5858
build: .
5959
runtime: nvidia
60-
image: aisl/pytorch-enet:latest
61-
command: bash -c "cd /root/catkin_ws && catkin build"
60+
image: aisl/pytorch-enet:20.03-py3
61+
command: bash -c "source /opt/ros/melodic/setup.bash && cd /root/catkin_ws && catkin build"
6262
environment:
63-
- CMAKE_PREFIX_PATH=/opt/ros/kinetic:${CMAKE_PREFIX_PATH}
63+
- CMAKE_PREFIX_PATH=/opt/ros/melodic:${CMAKE_PREFIX_PATH}
6464
volumes:
6565
- ./catkin_ws/:/root/catkin_ws/
6666
- ./PyTorch-ENet:/root/PyTorch-ENet

0 commit comments

Comments
 (0)