Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

px4-dev: Try to move to Python 3 #199

Merged
merged 3 commits into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions docker/Dockerfile_base-archlinux
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM archlinux/base:latest
LABEL maintainer="Julien Lecoeur <julien.lecoeur@gmail.com>"

RUN pacman -Sy --noconfirm \
RUN pacman -Sy --noconfirm \
arm-none-eabi-gcc \
arm-none-eabi-newlib \
base-devel \
Expand All @@ -18,30 +18,27 @@ RUN pacman -Sy --noconfirm \
nettle \
ninja \
python-pip \
python-setuptools \
tar \
unzip \
vim \
wget \
zip

# Install python dependencies
RUN pip install \
cerberus \
empy \
jinja2 \
numpy \
pyyaml \
serial \
toml
RUN python3 -m pip install --upgrade pip \
&& pip3 install argparse argcomplete coverage cerberus empy jinja2 \
matplotlib==3.0.* numpy pkgconfig pyulog pyyaml requests serial \
toml pyulog wheel

# Install genromfs
RUN wget https://sourceforge.net/projects/romfs/files/genromfs/0.5.2/genromfs-0.5.2.tar.gz \
RUN wget https://sourceforge.net/projects/romfs/files/genromfs/0.5.2/genromfs-0.5.2.tar.gz \
&& tar zxvf genromfs-0.5.2.tar.gz \
&& cd genromfs-0.5.2 && make && make install && cd .. \
&& rm genromfs-0.5.2.tar.gz genromfs-0.5.2 -r

# Install gosu
RUN curl -sSL https://github.com/tianon/gosu/releases/download/1.8/gosu-amd64 > /usr/sbin/gosu \
RUN curl -sSL https://github.com/tianon/gosu/releases/download/1.8/gosu-amd64 > /usr/sbin/gosu \
&& chmod +x /usr/sbin/gosu

# Gradle (Required to build Fast-RTPS-Gen)
Expand Down Expand Up @@ -70,10 +67,10 @@ RUN git clone --recursive https://github.com/eProsima/Fast-RTPS-Gen.git -b v1.0.
&& rm -rf /tmp/*

# Add group dialout
RUN groupadd dialout
RUN groupadd dialout

# manual ccache setup
RUN ln -s /usr/bin/ccache /usr/lib/ccache/bin/arm-none-eabi-gcc \
RUN ln -s /usr/bin/ccache /usr/lib/ccache/bin/arm-none-eabi-gcc \
&& ln -s /usr/bin/ccache /usr/lib/ccache/bin/arm-none-eabi-g++

ENV CCACHE_MAXSIZE=1G
Expand Down
14 changes: 8 additions & 6 deletions docker/Dockerfile_base-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ RUN apt-get update && apt-get -y --quiet --no-install-recommends install \
openjdk-8-jre \
openssh-client \
pkg-config \
python-pip \
python-pygments \
python-setuptools \
python3-pip \
python3-pygments \
python3-setuptools \
rsync \
shellcheck \
tzdata \
Expand All @@ -56,9 +56,11 @@ RUN cd /usr/src/gtest \
&& cp *.a /usr/lib \
&& cd .. && rm -rf build

RUN python -m pip install --upgrade pip \
&& pip install setuptools pkgconfig wheel \
&& pip install argparse argcomplete coverage jinja2 empy numpy requests serial toml pyyaml cerberus
# python3 dependencies installed by pip
RUN python3 -m pip install --upgrade pip \
&& pip3 install argparse argcomplete coverage cerberus empy jinja2 \
matplotlib==3.0.* numpy pkgconfig pyulog pyyaml requests serial \
toml pyulog wheel

# manual ccache setup
RUN ln -s /usr/bin/ccache /usr/lib/ccache/cc \
Expand Down
14 changes: 8 additions & 6 deletions docker/Dockerfile_base-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ RUN apt-get update && apt-get -y --quiet --no-install-recommends install \
openjdk-8-jre \
openssh-client \
pkg-config \
python-pip \
python-pygments \
python-setuptools \
python3-pip \
python3-pygments \
python3-setuptools \
rsync \
shellcheck \
tzdata \
Expand All @@ -56,9 +56,11 @@ RUN cd /usr/src/gtest \
&& cp *.a /usr/lib \
&& cd .. && rm -rf build

RUN python -m pip install --upgrade pip \
&& pip install setuptools pkgconfig wheel \
&& pip install argparse argcomplete coverage jinja2 empy numpy requests serial toml pyyaml cerberus
# python3 dependencies installed by pip
RUN python3 -m pip install --upgrade pip \
&& pip3 install argparse argcomplete coverage cerberus empy jinja2 \
matplotlib==3.0.* numpy pkgconfig pyulog pyyaml requests serial \
toml pyulog wheel

# manual ccache setup
RUN ln -s /usr/bin/ccache /usr/lib/ccache/cc \
Expand Down
5 changes: 1 addition & 4 deletions docker/Dockerfile_ros-kinetic
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6B
protobuf-compiler \
python-catkin-tools \
python-tk \
python3-pip \
ros-$ROS_DISTRO-gazebo-ros-pkgs \
ros-$ROS_DISTRO-mavlink \
ros-$ROS_DISTRO-mavros \
Expand All @@ -38,10 +37,8 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6B
&& geographiclib-get-geoids egm96-5 \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
# pip
# pip2
&& pip install px4tools pymavlink \
&& pip3 install setuptools wheel \
&& pip3 install pyulog matplotlib==3.0.* \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

RUN rosdep init && rosdep update
Expand Down
5 changes: 1 addition & 4 deletions docker/Dockerfile_ros-melodic
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6B
libopencv-dev \
python-catkin-tools \
python-tk \
python3-pip \
ros-$ROS_DISTRO-gazebo-ros-pkgs \
ros-$ROS_DISTRO-mavlink \
ros-$ROS_DISTRO-mavros \
Expand All @@ -35,10 +34,8 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6B
&& geographiclib-get-geoids egm96-5 \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
# pip
# pip2
&& pip install px4tools pymavlink \
&& pip3 install setuptools wheel \
&& pip3 install pyulog matplotlib==3.0.* \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

RUN rosdep init && rosdep update
1 change: 0 additions & 1 deletion docker/Dockerfile_simulation-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add
libimage-exiftool-perl \
libopencv-dev \
libxml2-utils \
pkg-config \
protobuf-compiler \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile_simulation-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add
libimage-exiftool-perl \
libopencv-dev \
libxml2-utils \
pkg-config \
protobuf-compiler \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
Expand Down