Skip to content

Commit c732194

Browse files
add install from source example dockerfile
1 parent 82bc7ae commit c732194

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ docker build docker --tag procgen
8383
docker run --rm -it procgen python3 -m procgen.examples.random_agent_gym
8484
```
8585

86+
There is a second `Dockerfile` to demonstrate installing from source:
87+
88+
```
89+
docker build . --tag procgen --file docker/Dockerfile.dev
90+
docker run --rm -it procgen python -c "from procgen import ProcgenGym3Env; env = ProcgenGym3Env(num=1, env_name='coinrun'); print(env.observe())"
91+
```
92+
8693
## Environments
8794

8895
The observation space is a box space with the RGB pixels the agent sees in a numpy array of shape (64, 64, 3). The expected step rate for a human player is 15 Hz.

docker/Dockerfile.dev

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This Dockerfile demonstrates the "Install from Source" option for using procgen
2+
FROM ubuntu:bionic-20191202
3+
RUN apt-get update && apt-get install --yes --no-install-recommends ca-certificates curl build-essential mesa-common-dev libglu1-mesa-dev
4+
RUN curl -o /tmp/miniconda-installer.sh https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh
5+
RUN bash /tmp/miniconda-installer.sh -b -p ~/miniconda
6+
ADD environment.yml .
7+
RUN ~/miniconda/bin/conda env update --name dev --file environment.yml
8+
ENV PATH=/root/miniconda/envs/dev/bin:/root/miniconda/bin:$PATH
9+
ADD . /procgen
10+
RUN pip install -e /procgen
11+
RUN python -c "from procgen import ProcgenGym3Env; ProcgenGym3Env(num=1, env_name='coinrun')"

0 commit comments

Comments
 (0)