Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inital Dockerfile #29

Merged
merged 1 commit into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from python

RUN apt-get update
RUN apt-get upgrade
RUN apt-get install nodejs npm -y

ENV ROOT_DIR=/home
ENV P2_PATH=$ROOT_DIR/P2-Lab

RUN git clone https://github.com/alan-turing-institute/P2-Lab $P2_PATH
RUN git clone https://github.com/smogon/pokemon-showdown $P2_PATH/pokemon-showdown
RUN git clone https://github.com/AoifeHughes/poke-env $P2_PATH/poke_env
RUN git clone https://github.com/phinate/showdown $P2_PATH/showdown

RUN python3 -m venv $P2_PATH/venv-pokemon
RUN pip install --upgrade pip setuptools wheel

RUN pip install -e $P2_PATH
RUN pip install -e $P2_PATH/poke_env

RUN npm install -g $P2_PATH/pokemon-showdown

WORKDIR $P2_PATH/pokemon-showdown
ENTRYPOINT node pokemon-showdown start --no-security && python $P2_PATH/run.py
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ steps:
`pokemon-showdown` directory
- cd back to the root directory and run `python run.py` to run the demo!

or via Docker:

`docker build -t p2:latest .` `docker run -it p2:latest`
`docker exec -it your_container_id /bin/bash`

then go to the P2 root and run the script. Run docker build with `--no-cache` to
rebuild with newer versions of the repos.

## Components

### Pokemon showdown engine:
Expand Down