Skip to content

Commit

Permalink
fix kaggle-simulations-chess package
Browse files Browse the repository at this point in the history
  • Loading branch information
bovard committed Nov 15, 2024
1 parent 1c7222c commit 0bd0019
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docker/cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,27 @@ 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/
# 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__
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 rm -rf ./kaggle_environments
RUN ls ./kaggle_environments_chess
# install kaggle-environments-chess
RUN pip install .
RUN pip install . && pytest

CMD kaggle-environments

0 comments on commit 0bd0019

Please sign in to comment.