From a91a98fd608e245c1f76ffffd5b99fb4a6c0adfb Mon Sep 17 00:00:00 2001 From: Bovard Doerschuk-Tiberi Date: Fri, 15 Nov 2024 13:38:42 -1000 Subject: [PATCH] Fix kaggle-simulations-chess package (#314) * fix kaggle-simulations-chess package * fixes * update MANIFEST --- docker/cpu.Dockerfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docker/cpu.Dockerfile b/docker/cpu.Dockerfile index 509a898d..a26df840 100644 --- a/docker/cpu.Dockerfile +++ b/docker/cpu.Dockerfile @@ -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