| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6515aba commit 64fb057
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,25 +9,3 @@ else | |||
| 9 | 9 | docker pull continuumio/anaconda3:latest | |
| 10 | 10 | docker build --rm --no-cache -t kaggle/python-build . | |
| 11 | 11 | fi | |
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - rm -rf /tmp/python-build | ||
| 16 | - docker rm jupyter_test || true | ||
| 17 | - mkdir -p /tmp/python-build/tmp | ||
| 18 | - mkdir -p /tmp/python-build/devshm | ||
| 19 | - mkdir -p /tmp/python-build/working | ||
| 20 | - # Check that Jupyter server can run; if it dies on startup, the `docker kill` command will throw an error | ||
| 21 | - docker run -d --name=jupyter_test --read-only --net=none -e HOME=/tmp -v $PWD:/input:ro -v /tmp/python-build/working:/working -w=/working -v /tmp/python-build/tmp:/tmp -v /tmp/python-build/devshm:/dev/shm kaggle/python-build jupyter notebook --allow-root --ip="*" | ||
| 22 | - sleep 3 | ||
| 23 | - docker kill jupyter_test && docker rm jupyter_test | ||
| 24 | - docker run --rm -t --read-only --net=none -e HOME=/tmp -e KAGGLE_DATA_PROXY_TOKEN=test-key -e KAGGLE_DATA_PROXY_URL=http://127.0.0.1:8000 -e KAGGLE_DATA_PROXY_PROJECT=test -v $PWD:/input:ro -v /tmp/python-build/working:/working -w=/working -v /tmp/python-build/tmp:/tmp -v /tmp/python-build/devshm:/dev/shm kaggle/python-build /bin/bash -c 'python /input/test_build.py' | ||
| 25 | - | ||
| 26 | - # The test_build.py script creates a plot called plot1.png; check that it exists | ||
| 27 | - [ -s /tmp/python-build/working/plot1.png ] || exit 1 | ||
| 28 | - | ||
| 29 | - docker tag kaggle/python-build gcr.io/kaggle-images/python | ||
| 30 | - gcloud docker -- push gcr.io/kaggle-images/python | ||
| 31 | - | ||
| 32 | - docker tag kaggle/python-build:latest kaggle/python:latest | ||
| 33 | - docker push kaggle/python:latest | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,11 @@ | |||
| 1 | + #!/bin/bash | ||
| 2 | + set -e | ||
| 3 | + set +x | ||
| 4 | + | ||
| 5 | + label=${1:-testing} | ||
| 6 | + | ||
| 7 | + docker tag kaggle/python-build:latest gcr.io/kaggle-images/python:${label} | ||
| 8 | + gcloud docker -- push gcr.io/kaggle-images/python:${label} | ||
| 9 | + | ||
| 10 | + docker tag kaggle/python-build:latest kaggle/python:${label} | ||
| 11 | + docker push kaggle/python:${label} | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + #!/bin/bash | ||
| 2 | + set -e | ||
| 3 | + set +x | ||
| 4 | + | ||
| 5 | + rm -rf /tmp/python-build | ||
| 6 | + docker rm jupyter_test || true | ||
| 7 | + mkdir -p /tmp/python-build/tmp | ||
| 8 | + mkdir -p /tmp/python-build/devshm | ||
| 9 | + mkdir -p /tmp/python-build/working | ||
| 10 | + # Check that Jupyter server can run; if it dies on startup, the `docker kill` command will throw an error | ||
| 11 | + docker run -d --name=jupyter_test --read-only --net=none -e HOME=/tmp -v $PWD:/input:ro -v /tmp/python-build/working:/working -w=/working -v /tmp/python-build/tmp:/tmp -v /tmp/python-build/devshm:/dev/shm kaggle/python-build jupyter notebook --allow-root --ip="*" | ||
| 12 | + sleep 3 | ||
| 13 | + docker kill jupyter_test && docker rm jupyter_test | ||
| 14 | + docker run --rm -t --read-only --net=none -e HOME=/tmp -e KAGGLE_DATA_PROXY_TOKEN=test-key -e KAGGLE_DATA_PROXY_URL=http://127.0.0.1:8000 -e KAGGLE_DATA_PROXY_PROJECT=test -v $PWD:/input:ro -v /tmp/python-build/working:/working -w=/working -v /tmp/python-build/tmp:/tmp -v /tmp/python-build/devshm:/dev/shm kaggle/python-build /bin/bash -c 'python /input/test_build.py' | ||
| 15 | + | ||
| 16 | + # The test_build.py script creates a plot called plot1.png; check that it exists | ||
| 17 | + [ -s /tmp/python-build/working/plot1.png ] || exit 1 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments