update dockerfile + pin all versions

This commit is contained in:
Nicklas Hansen
2024-01-21 21:21:44 -08:00
parent a2d9d0c8ff
commit f0af4b6b27
5 changed files with 98 additions and 100 deletions

View File

@@ -1,10 +1,18 @@
##########################################
# Dockerfile for TD-MPC2 #
# TD-MPC2 Anonymous Authors, 2023 (c) #
# Nicklas Hansen, 2023 (c) #
# https://www.tdmpc2.com #
# -------------------------------------- #
# Instructions: #
# docker build . -t <user>/tdmpc2:0.1.0 #
# docker push <user>/tdmpc2:0.1.0 #
# Build instructions: #
# docker build . -t <user>/tdmpc2:1.0.0 #
# docker push <user>/tdmpc2:1.0.0 #
# -------------------------------------- #
# Run: #
# docker run -i \ #
# -v <path>/<to>/tdmpc2:/tdmpc2 \ #
# --gpus all \ #
# -t <user>/tdmpc2:1.0.0 \ #
# /bin/bash #
##########################################
# base image
@@ -36,19 +44,15 @@ SHELL ["/bin/bash", "-c"]
# conda environment
COPY nvidia_icd.json /usr/share/vulkan/icd.d/nvidia_icd.json
COPY environment.yaml /root
RUN conda env update -n base -f /root/environment.yaml && \
RUN conda update conda && \
conda env update -n base -f /root/environment.yaml && \
rm /root/environment.yaml && \
cd /root && \
python -m mani_skill2.utils.download_asset all -y && \
conda clean -ya && \
pip cache purge
# environment variables
# mujoco 2.1.0
ENV MUJOCO_GL egl
ENV MS2_ASSET_DIR /root/data
ENV LD_LIBRARY_PATH /root/.mujoco/mujoco210/bin:${LD_LIBRARY_PATH}
# mujoco (required for metaworld)
RUN mkdir -p /root/.mujoco && \
wget https://www.tdmpc2.com/files/mjkey.txt && \
wget https://github.com/deepmind/mujoco/releases/download/2.1.0/mujoco210-linux-x86_64.tar.gz && \
@@ -57,3 +61,21 @@ RUN mkdir -p /root/.mujoco && \
mv mujoco210 /root/.mujoco/mujoco210 && \
mv mjkey.txt /root/.mujoco/mjkey.txt && \
python -c "import mujoco_py"
# gym
RUN pip install gym==0.21.0
# metaworld
RUN pip install git+https://github.com/Farama-Foundation/Metaworld.git@04be337a12305e393c0caf0cbf5ec7755c7c8feb
# maniskill2
ENV MS2_ASSET_DIR /root/data
RUN pip install mani-skill2==0.4.1 && \
cd /root && \
python -m mani_skill2.utils.download_asset all -y
# myosuite (conflicts with meta-world / mani-skill2)
# RUN pip install myosuite
# success!
RUN echo "Successfully built TD-MPC2 Docker image!"