Commit d6ba2a88 authored by eric_hammy's avatar eric_hammy
Browse files

Merge branch 'eric/tb-dockerfile' into 'master'

Add Dockerfile for TB baseline.

See merge request nethack/neurips-2021-the-nethack-challenge!3
parents 2e038224 815bdd05
# -*- mode: dockerfile -*-
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -yq \
bison \
build-essential \
cmake \
curl \
flex \
git \
libbz2-dev \
ninja-build \
software-properties-common \
wget \
apt-transport-https \
ca-certificates \
# Install the latest cmake
RUN wget -O - 2>/dev/null | apt-key add -
RUN apt-add-repository 'deb focal main'
RUN apt-get update && apt-get --allow-unauthenticated install -yq cmake kitware-archive-keyring
# Install Conda
WORKDIR /opt/conda_setup
RUN curl -o && \
chmod +x && \
./ -b -p /opt/conda && \
/opt/conda/bin/conda install -y python=$PYTHON_VERSION && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
# Create Env, Install Torch and Keep Env active
RUN conda init bash
RUN conda create -n nle python=3.7
RUN conda install -n nle pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
ENV BASH_ENV ~/.bashrc
SHELL ["conda", "run", "-n", "nle", "/bin/bash" ,"-c"]
RUN python -c 'import torch'
# Install TorchBeast
RUN git clone --recursive
WORKDIR /opt/torchbeast
RUN pip install -r requirements.txt
RUN pip install ./nest
RUN python install
# Create Workspace
WORKDIR /opt/workspace
RUN pip install nle \
hydra-core \
hydra_colorlog \
wandb \
RUN echo "conda activate nle" >> ~/.bashrc
CMD ["/bin/bash"]
# Docker commands:
# docker build -t nle .
# docker run -v current_dir:/opt/workspace -it nle
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment