Skip to content

Commit

Permalink
Merge pull request #29 from alan-turing-institute/dockerise
Browse files Browse the repository at this point in the history
Add inital Dockerfile
  • Loading branch information
phinate authored Jun 18, 2023
2 parents ee7d751 + 157578b commit e3b0b29
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
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

0 comments on commit e3b0b29

Please sign in to comment.