This is a Docker container which runs gcsfuse and jupyter-notebook, which allows to make notebooks on live Google bucket data sets.
- See the
Dockerfilefor details on Python setup - Requires JSON key credentials from Google for bucket access (uses
gcloudfor auth)
git clone https://github.com/fredrikaverpil/jugs.gitTo gain access to a bucket, download a Google JSON credentials file from your GCE console and place it in the repository root folder as key.json.
docker build -t fredrikaverpil/jugs .Linux
docker run --rm --detach --privileged --name="jugs" --hostname jugs -p 8888:8888 --volume $(pwd):/jugs fredrikaverpil/jugsWindows (CMD.exe)
docker run --rm --detach --privileged --name="jugs" --hostname jugs -p 8888:8888 --volume %CD%:/jugs fredrikaverpil/jugsWindows (Powershell)
docker run --rm --detach --privileged --name="jugs" --hostname jugs -p 8888:8888 --volume ${PWD}:/jugs fredrikaverpil/jugsdocker exec -ti jugs bashmkdir -p /bucket
gcsfuse -o ro --key-file=/jugs/key.json my-bucket /bucket # read only accessIf folders are missing, use the --implicit-dirs option (slow!), read more on that here.
~/miniconda/envs/jugs/bin/jupyter notebook --allow-root --no-browser --ip=$(hostname -i)Notes:
- Access Jupyter:
http://localhost:8888 - Use this option to avoid using the token:
--NotebookApp.token=''
You can now create Jupyter notebooks which have live access to a Google bucket. Save the notebooks in /jugs so that you can access them later...
docker stop jugs
docker rm -vf jugsdocker rmi -f jugs