Skip to content

Commit 7d96dee

Browse files
authored
Avoid having to use sudo for running the tests. (Kaggle#962)
A test run creates files under the /tmp/python-build directory. The owner of these files are the user assigned to your docker process. Running `rm -rf /tmp/python-build` in the test script fails with: ``` rm: cannot remove '/tmp/python-build/working/logs/train_log/events.out.tfevents.1614297217.localhost': Permission denied ... ``` Because your user don't have the permissions to delete these files. Updating the `test` script to delete these files inside the a docker container to circumvent this problem.
1 parent e0a40b7 commit 7d96dee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ readonly ADDITONAL_OPTS
6969
readonly PATTERN
7070

7171
set -x
72-
rm -rf /tmp/python-build
72+
docker run --rm --net=none -v /tmp/python-build:/tmp/python-build "$IMAGE_TAG" rm -rf /tmp/python-build/*
73+
7374
docker rm jupyter_test || true
7475
mkdir -p /tmp/python-build/tmp
7576
mkdir -p /tmp/python-build/devshm

0 commit comments

Comments
 (0)