-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from watakandai/dockerfile
Dockerfile
- Loading branch information
Showing
6 changed files
with
563 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "specless Docker container", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "specless", | ||
"workspaceFolder": "/home/specless", | ||
"privileged": true, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"esbenp.prettier-vscode", | ||
"redhat.vscode-yaml", | ||
"aaron-bond.better-comments", | ||
"shardulm94.trailing-spaces", | ||
"ms-python.black-formatter", | ||
"ms-toolsai.jupyter" | ||
], | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
} | ||
], | ||
"settings": { | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"python.formatting.provider": "black", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"python.formatting.blackArgs": [ | ||
"--line-length", | ||
"88", | ||
"--skip-magic-trailing-comma" | ||
] | ||
}, | ||
"nb_black.black_on_save": true, | ||
"isort.args": [ | ||
"--profile", | ||
"black" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.8' | ||
|
||
services: | ||
specless: | ||
build: | ||
context: ../ | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ../:/home/specless | ||
stdin_open: true | ||
tty: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
FROM hardikparwana/cuda12-ubuntu22:cuda122-cudnn8-jax | ||
ARG PYTHON_VERSION=3.11 | ||
FROM python:${PYTHON_VERSION} | ||
|
||
# ROS2 installation | ||
RUN apt update && apt install -y locales | ||
RUN locale-gen en_US en_US.UTF-8 | ||
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | ||
RUN LANG=en_US.UTF-8 | ||
RUN apt-get install -y software-properties-common | ||
RUN add-apt-repository universe | ||
RUN apt update && apt install curl -y | ||
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
RUN apt update | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt install -y ros-humble-desktop | ||
RUN apt install -y ros-dev-tools | ||
RUN echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc | ||
# https://python-poetry.org/docs#ci-recommendations | ||
ENV POETRY_VERSION=1.7.0 | ||
# ENV POETRY_HOME=/opt/poetry | ||
ENV POETRY_VENV=/opt/poetry-venv | ||
|
||
RUN apt-get install -y ros-humble-navigation2 ros-humble-nav2-bringup ros-humble-turtlebot3* | ||
RUN apt-get install -y ros-humble-nav2-simple-commander | ||
# Tell Poetry where to place its cache and virtual environment | ||
ENV POETRY_CACHE_DIR=/opt/.cache | ||
|
||
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc | ||
RUN echo "source /usr/share/gazebo/setup.sh" >> ~/.bashrc | ||
RUN echo "source /home/mobile_arm/colcon_ws/install/local_setup.bash" >> ~/.bashrc | ||
# Creating a virtual environment just for poetry and install it with pip | ||
RUN python3 -m venv $POETRY_VENV \ | ||
&& $POETRY_VENV/bin/pip install -U pip setuptools \ | ||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION} | ||
|
||
|
||
# Add Poetry to PATH | ||
ENV PATH="${PATH}:${POETRY_VENV}/bin" | ||
|
||
ENV POETRY_VIRTUALENVS_IN_PROJECT=true | ||
|
||
CMD ["bash"] |
Oops, something went wrong.