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

Update Dockerfile - basic python dependencies #9

Merged
merged 1 commit into from
Aug 20, 2024
Merged
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
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ RUN apt-get update && apt-get install -y \
git \
htop \
vim \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

# Install python packages
RUN pip3 install --upgrade pip
RUN pip3 install numpy matplotlib scipy scikit-learn
RUN pip3 install h5py torch==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
RUN rm -rf /root/.cache/pip

# Clone the ros2-vicon-receiver package
ENV WS /vicon_ws
Expand All @@ -36,8 +42,12 @@ RUN source vicon_ws/install/setup.bash
RUN echo ". /opt/ros/foxy/setup.bash" >> /root/.bashrc
RUN echo ". /vicon_ws/install/setup.bash" >> /root/.bashrc

# Set alias
RUN echo "alias python=python3" >> /root/.bashrc
RUN echo "alias pip=pip3" >> /root/.bashrc

RUN sed -e '/[ -z "$PS1" ] && return/s/^/#/g' -i /root/.bashrc

# Set the entrypoint to use ROS 2
ENTRYPOINT ["/bin/bash", "-c", "source ~/.bashrc && exec \"$@\"", "--"]
CMD ["bash"]
CMD ["bash"]