Skip to content

Commit

Permalink
Fix kaggle-simulations-chess package (#314)
Browse files Browse the repository at this point in the history
* fix kaggle-simulations-chess package

* fixes

* update MANIFEST
  • Loading branch information
bovard authored Nov 15, 2024
1 parent 1c7222c commit a91a98f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docker/cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,28 @@ ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
ADD ./kaggle_environments ./kaggle_environments


# install kaggle-environments
RUN pip install Flask bitsandbytes accelerate vec-noise jax gymnax==0.0.8 && pip install . && pytest

# SET UP KAGGLE-ENVIRONMENTS CHESS
# minimal package to reduce memory footprint
# rename pip package
RUN sed -i 's/kaggle-environments/kaggle-environments-chess/g' ./setup.py
RUN sed -i 's/kaggle_environments/kaggle_environments_chess/g' ./setup.py
RUN mkdir ./kaggle_environments_chess
RUN cp -r ./kaggle_environments/* ./kaggle_environments_chess/
RUN rm -rf ./kaggle_environments
# remove other runtimes
RUN find ./kaggle_environments_chess/envs -mindepth 1 -maxdepth 1 ! -name "chess" -type d -exec rm -rf {} +
# pyclean
RUN rm -rf ./kaggle_environments_chess/__pycache__; rm -rf ./kaggle_environments_chess/envs/__pycache__; rm -rf ./kaggle_environments_chess/envs/chess/__pycache__; true
RUN find ./kaggle_environments_chess/ -name "*.pyc" -exec rm -f {} \;

# rename pip package
RUN sed -i 's/kaggle-environments/kaggle-environments-chess/g' ./setup.py
RUN sed -i 's/kaggle_environments/kaggle_environments_chess/g' ./setup.py
RUN sed -i 's/kaggle_environments/kaggle_environments_chess/g' ./MANIFEST.in

# install kaggle-environments-chess
RUN pip install .
RUN pip install . && pytest

CMD kaggle-environments

0 comments on commit a91a98f

Please sign in to comment.