Skip to content

Instantly share code, notes, and snippets.

@takuseno
Last active April 4, 2025 00:52
Show Gist options
  • Save takuseno/0c9a025d807f79942b581e9fb76fde9a to your computer and use it in GitHub Desktop.
Save takuseno/0c9a025d807f79942b581e9fb76fde9a to your computer and use it in GitHub Desktop.
Dockerfile for development with unitree-rl-gym
#!/bin/bash -eux
docker build -t takuseno/unitree-rl-gym-dev:latest .
FROM takuseno/unitree-rl-gym:latest
USER root
RUN apt-get update && apt-get install silversearcher-ag ripgrep libfuse2 fuse && \
wget https://github.com/neovim/neovim/releases/download/v0.9.0/nvim.appimage && \
chmod +x nvim.appimage && \
mkdir -p /usr/local/bin && \
mv nvim.appimage /usr/local/bin/nvim
USER gymuser
RUN git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim && \
git clone https://github.com/takuseno/dotfiles ~/dotfiles && \
mkdir ~/.config && \
cp -r ~/dotfiles/.config/nvim ~/.config/nvim && \
pip install neovim
#!/bin/bash
set -e
set -u
if [ $# -eq 0 ]
then
echo "running docker without display"
docker run -it \
--network=host \
--gpus=all \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--security-opt apparmor:unconfined \
--name=isaacgym_container \
takuseno/unitree-rl-gym-dev:latest /bin/bash
else
export DISPLAY=$DISPLAY
echo "setting display to $DISPLAY"
xhost +
docker run -it \
--rm \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
--network=host \
--gpus=all \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--security-opt apparmor:unconfined \
--name=isaacgym_container \
takuseno/unitree-rl-gym-dev:latest /bin/bash
xhost -
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment