Safe-Reinforcement-Learning / safe-reinforcement-learning

Repository containing the Safe Reinforcement Learning team's work.
0 stars 0 forks source link

Allow git commands to be executed within Docker #12

Closed vrn-sn closed 9 months ago

vrn-sn commented 9 months ago

This is as simple as adding the following line to all our Dockerfiles.

RUN git config --global --add safe.directory '*'

Since this is a static instruction, we could put this as the first command to be executed, e.g. appearing immediately after the header, as follows.

FROM nvcr.io/nvidia/base-image-name

RUN git config --global --add safe.directory '*'

Make sure to rebuild the docker images with the following command (run from the root of the repository):

docker build -t saferl/tensorflow -f ./docker/tensorflow.Dockerfile ./docker && docker build -t saferl/pytorch -f ./docker/pytorch.Dockerfile ./docker

And to prune the older, now-detached images:

docker image prune