Commit 171e8277 authored by Adam Fekete's avatar Adam Fekete
Browse files

cleanup, minor fixes

parent ee5ed773
Pipeline #67221 passed with stages
in 1 minute and 12 seconds
......@@ -19,59 +19,56 @@ The docker image is suitable for running/testing locally and for deploying it by
docker build -t analytics-workshop:latest notebook
```
### Testing/Developing the notebooks locally
- Use the following command to run the docker image locally:
```bash
docker run --rm \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
- To have a password-less sudo access in the container use the following command:
```bash
docker exec -it --user root analytics-workshop start.sh
```
more info: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html?highlight=root#alternative-commands
```bash
docker run --rm \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
Note: Although the `--rm` option is useful, you have to use it very carefully. When you stop the notebook server, you can lose all of your modifications which hasn't been stored into the mounted folder.
- To attach a terminal to the running container, you can use the following command:
```bash
docker exec -it analytics-workshop start.sh
```
More info: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html?highlight=root#alternative-commands
### Useful tricks for Linux
- you may consider using the '--rm' option which deletes the container when it stops. Be careful in this way you will lose everything which was not stored into the mounted folder.
```bash
docker run \
--rm \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
- For mounting a folder, you may need to use an absolute path or other tricks if the PWD environmental variable is not accessible in your shell:
```bash
docker run \
--rm \
-p 8888:8888 \
-v /path/for/the/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
- you may need to change the user id in the container - by adding "-e NB_UID=1001" and "--user root" options to your command - to have access for the mounted folders:
```bash
docker run \
--rm \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--user root \
-e NB_UID=1001 \
--name analytics-workshop \
analytics-workshop:latest
```
```bash
docker run --rm \
-p 8888:8888 \
-v /path/for/the/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
- you may need to change the user id in the container - by adding `--user root` and `-e NB_UID=1001` options to your command - to have access for the mounted folders:
```bash
docker run --rm \
--user root \
-e NB_UID=1001 \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
- you can have a password-less sudo access in the container for debugging by adding `--user root` and `-e GRANT_SUDO=yes` options to your command:
```bash
docker run --rm \
--user root \
-e GRANT_SUDO=yes \
-p 8888:8888 \
-v $PWD/notebook/tutorials:/home/jovyan/tutorials \
--name analytics-workshop \
analytics-workshop:latest
```
More information about the command line options: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#notebook-options
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment