Last active
January 27, 2022 20:26
-
-
Save kouroshHakha/dffbad569c4722544ffafbee962492b4 to your computer and use it in GitHub Desktop.
docker file starter for mujoco210
This file contains hidden or 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
| FROM nvidia/cuda:11.5.1-cudnn8-devel-ubuntu18.04 | |
| # install anaconda3 | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| wget \ | |
| git \ | |
| vim \ | |
| virtualenv | |
| RUN curl -Lko /tmp/Anaconda3-2021.11-Linux-x86_64.sh https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh && \ | |
| chmod +x /tmp/Anaconda3-2021.11-Linux-x86_64.sh && \ | |
| bash /tmp/Anaconda3-2021.11-Linux-x86_64.sh -b -p /root/anaconda && \ | |
| rm -rf /tmp/Anaconda3-2021.11-Linux-x86_64.sh | |
| ENV PATH="/root/anaconda/bin:$PATH" | |
| # install mujoco: https://github.com/openai/mujoco-py/blob/master/Dockerfile | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-dev \ | |
| libgl1-mesa-glx \ | |
| libglew-dev \ | |
| libosmesa6-dev \ | |
| software-properties-common \ | |
| net-tools \ | |
| xpra \ | |
| xserver-xorg-dev \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl -o /usr/local/bin/patchelf https://s3-us-west-2.amazonaws.com/openai-sci-artifacts/manual-builds/patchelf_0.9_amd64.elf \ | |
| && chmod +x /usr/local/bin/patchelf | |
| ENV LANG C.UTF-8 | |
| RUN mkdir -p /root/.mujoco \ | |
| && wget https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz \ | |
| && tar -xf mujoco.tar.gz -C /root/.mujoco \ | |
| && rm mujoco.tar.gz | |
| ENV LD_LIBRARY_PATH /root/.mujoco/mujoco210/bin:${LD_LIBRARY_PATH} | |
| ENV LD_LIBRARY_PATH /usr/local/nvidia/lib64:${LD_LIBRARY_PATH} | |
| # Copy over just mujoco requirements.txt at first. That way, the Docker cache doesn't | |
| # expire until we actually change the requirements. | |
| WORKDIR /tmp/mujoco_py/ | |
| COPY ./requirements.mujoco.txt /tmp/mujoco_py/ | |
| COPY ./requirements.mujoco.dev.txt /tmp/mujoco_py/ | |
| RUN pip install --no-cache-dir -r requirements.mujoco.txt | |
| RUN pip install --no-cache-dir -r requirements.mujoco.dev.txt | |
| RUN pip install "mujoco-py<2.2,>=2.1" | |
| RUN python -c "import mujoco_py" | |
| # enable mujoco headless gpu rendering | |
| ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-000 | |
| RUN mkdir -p /usr/lib/nvidia-000 | |
| WORKDIR /root |
This file contains hidden or 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
| imagehash>=3.4 | |
| ipdb | |
| Pillow>=4.0.0 | |
| pycparser>=2.17.0 | |
| pytest>=3.0.5 | |
| pytest-instafail==0.3.0 | |
| sphinx | |
| sphinx_rtd_theme | |
| numpydoc |
This file contains hidden or 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
| # When updating these, you may need to also update pyproject.toml | |
| glfw>=1.4.0 | |
| numpy>=1.11 | |
| Cython>=0.27.2 | |
| imageio>=2.1.2 | |
| cffi>=1.10 | |
| fasteners~=0.15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment