forked from justinjfu/doodad
-
Notifications
You must be signed in to change notification settings - Fork 9
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 justinjfu#9 from rail-berkeley/misc-updates
Misc updates
- Loading branch information
Showing
7 changed files
with
2,080 additions
and
11 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
Empty file.
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
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,98 @@ | ||
# We need the CUDA base dockerfile to enable GPU rendering | ||
# on hosts with GPUs. | ||
# The image below is a pinned version of nvidia/cuda:9.1-cudnn7-devel-ubuntu16.04 (from Jan 2018) | ||
# If updating the base image, be sure to test on GPU since it has broken in the past. | ||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
########################################################## | ||
### System dependencies | ||
########################################################## | ||
|
||
# Now let's download python 3 and all the dependencies | ||
RUN apt-get update -q \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
libav-tools \ | ||
libgl1-mesa-dev \ | ||
libgl1-mesa-glx \ | ||
libglew-dev \ | ||
libosmesa6-dev \ | ||
net-tools \ | ||
software-properties-common \ | ||
swig \ | ||
unzip \ | ||
vim \ | ||
wget \ | ||
xpra \ | ||
xserver-xorg-dev \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# Not sure why this is needed | ||
ENV LANG C.UTF-8 | ||
|
||
# Not sure what this is fixing | ||
COPY ./files/Xdummy /usr/local/bin/Xdummy | ||
RUN chmod +x /usr/local/bin/Xdummy | ||
|
||
# Workaround for https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-375/+bug/1674677 | ||
COPY ./files/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json | ||
|
||
# Not sure why this is needed | ||
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib64:${LD_LIBRARY_PATH} | ||
|
||
########################################################## | ||
### MuJoCo | ||
########################################################## | ||
# Note: ~ is an alias for /root | ||
RUN mkdir -p /root/.mujoco \ | ||
&& wget https://www.roboti.us/download/mujoco200_linux.zip -O mujoco.zip \ | ||
&& unzip mujoco.zip -d /root/.mujoco \ | ||
&& rm mujoco.zip | ||
RUN mkdir -p /root/.mujoco \ | ||
&& wget https://www.roboti.us/download/mjpro150_linux.zip -O mujoco.zip \ | ||
&& unzip mujoco.zip -d /root/.mujoco \ | ||
&& rm mujoco.zip | ||
COPY ./files/mjkey.txt /root/.mujoco/mjkey.txt | ||
RUN ln -s /root/.mujoco/mujoco200_linux /root/.mujoco/mujoco200 | ||
ENV LD_LIBRARY_PATH /root/.mujoco/mjpro150/bin:${LD_LIBRARY_PATH} | ||
ENV LD_LIBRARY_PATH /root/.mujoco/mujoco200/bin:${LD_LIBRARY_PATH} | ||
ENV LD_LIBRARY_PATH /root/.mujoco/mujoco200_linux/bin:${LD_LIBRARY_PATH} | ||
|
||
|
||
|
||
########################################################## | ||
### Example Python Installation | ||
########################################################## | ||
ENV PATH /opt/conda/bin:$PATH | ||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \ | ||
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \ | ||
rm /tmp/miniconda.sh && \ | ||
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | ||
echo ". /opt/conda/etc/profile.d/conda.sh" >> /etc/bash.bashrc | ||
|
||
RUN conda update -y --name base conda && conda clean --all -y | ||
|
||
RUN conda create --name customenv python=3.6.5 pip | ||
RUN echo "source activate customenv" >> ~/.bashrc | ||
# Use the railrl pip | ||
ENV OLDPATH $PATH | ||
ENV PATH /opt/conda/envs/customenv/bin:$PATH | ||
|
||
# Install packages here | ||
RUN pip install cloudpickle==0.5.2 | ||
RUN pip install torch==1.1.0 | ||
RUN pip install torchvision | ||
|
||
########################################################## | ||
### gym sometimes has this patchelf issue | ||
########################################################## | ||
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 | ||
RUN pip install gym[all]==0.12.5 |
6 changes: 6 additions & 0 deletions
6
doodad/wrappers/easy_launch/docker_example/files/10_nvidia.json
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,6 @@ | ||
{ | ||
"file_format_version" : "1.0.0", | ||
"ICD" : { | ||
"library_path" : "libEGL_nvidia.so.0" | ||
} | ||
} |
Oops, something went wrong.