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

GPU Image fixes #251

Merged
merged 2 commits into from
Nov 29, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
bin/
lib64
pyvenv.cfg
share/


# Distribution / packaging
Expand Down
12 changes: 0 additions & 12 deletions docker/cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ RUN npm -v

WORKDIR /usr/src/app/kaggle_environments

# Conda boost interferes with gfootball
# RUN rm -r /opt/conda/lib/cmake/Boost-1.*
# RUN apt-get update
# RUN apt-get -y install libsdl2-gfx-dev libsdl2-ttf-dev libsdl2-image-dev
# RUN cd /tmp && \
# git clone --single-branch --branch v2.8 https://github.com/google-research/football.git && \
# cd football && \
# sed -i 's/copy2/move/g' gfootball/env/observation_processor.py && \
# sed -i 's/os\.remove/# os.remove/g' gfootball/env/observation_processor.py && \
# pip3 install . && \
# cd /tmp && rm -rf football

ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
Expand Down
39 changes: 23 additions & 16 deletions docker/gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@

FROM gcr.io/kaggle-gpu-images/python:latest

WORKDIR /usr/src/app/kaggle_environments
# NODE

# install node and npm from nodesource https://github.com/nodesource/distributions
# use a local mirror of the setup script to avoid `curl | bash`
ADD docker/nodesource_setup_14.x.sh node_setup.sh
RUN sh node_setup.sh
RUN apt-get install -y nodejs

# link the newly installed versions to /opt/node so we can prioritize these versions over the versions /opt/conda has.
RUN mkdir /opt/node && \
ln -s /usr/bin/node /opt/node/ && \
ln -s /usr/bin/npm /opt/node/

# add node and npm to path so the commands are available
ENV PATH /opt/node:$PATH
ENV NODE_PATH /usr/lib/node_modules

# Conda boost interferes with gfootball
RUN rm -r /opt/conda/lib/cmake/Boost-1.*
RUN apt-get update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install libsdl2-gfx-dev libsdl2-ttf-dev libsdl2-image-dev xorg
RUN cd /tmp && \
git clone --single-branch --branch v2.8 https://github.com/google-research/football.git && \
cd football && \
sed -i 's/copy2/move/g' gfootball/env/observation_processor.py && \
sed -i 's/os\.remove/# os.remove/g' gfootball/env/observation_processor.py && \
sed -i 's/except:/except Exception as e:/g' gfootball/env/observation_processor.py && \
sed -i 's/logging\.error(traceback\.format_exc())/raise e/g' gfootball/env/observation_processor.py && \
sed -i 's/logging\.info/print/g' gfootball/env/observation_processor.py && \
pip3 install . && \
cd /tmp && rm -rf football
# confirm installation
RUN node -v
RUN npm -v

# END NODE

WORKDIR /usr/src/app/kaggle_environments

RUN pip install Flask

Expand Down
Loading