linked medium article, fixed typo

This commit is contained in:
Chris 2019-12-27 18:06:07 +01:00 committed by GitHub
parent cec4d31341
commit 59a804b819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
# gpu-jupyter # GPU-Jupyter
#### Leverage Jupyter Notebooks with the power of your NVIDIA GPU and perform GPU calculations using Tensorflow and Pytorch in collaborative notebooks. #### Leverage Jupyter Notebooks with the power of your NVIDIA GPU and perform GPU calculations using Tensorflow and Pytorch in collaborative notebooks.
![Jupyterlab Overview](/extra/jupyterlab-overview.png) ![Jupyterlab Overview](/extra/jupyterlab-overview.png)
@ -17,8 +17,8 @@ First of all, thanks to [hub.docker.com/u/jupyter](https://hub.docker.com/u/jupy
1. Install [Docker](https://www.docker.com/community-edition#/download) version **1.10.0+** 1. Install [Docker](https://www.docker.com/community-edition#/download) version **1.10.0+**
2. Install [Docker Compose](https://docs.docker.com/compose/install/) version **1.6.0+** 2. Install [Docker Compose](https://docs.docker.com/compose/install/) version **1.6.0+**
3. A NVIDIA GPU
3. Get access to use your GPU via the CUDA drivers, see this [blog-post](https://medium.com/@christoph.schranz) 3. Get access to use your GPU via the CUDA drivers, check out this [medium](https://medium.com/@christoph.schranz/set-up-your-own-gpu-based-jupyterlab-e0d45fcacf43) article.
4. Clone this repository 4. Clone this repository
```bash ```bash
git clone https://github.com/iot-salzburg/gpu-jupyter.git git clone https://github.com/iot-salzburg/gpu-jupyter.git
@ -32,9 +32,9 @@ As soon as you have access to your GPU locally (it can be tested via a Tensorflo
./start-local.sh ./start-local.sh
``` ```
This will run *gpu-jupyter* on the default port [localhost:8888](http://localhost:8888) with the default password `asdf`. The general usage is: This will run *GPU-Jupyter* by default on [localhost:8888](http://localhost:8888) with the default password `asdf`. The general usage is:
```bash ```bash
./start-local.sh -p [port] # port must be an integer with 4 or more digits. ./start-local.sh -p [port:8888] # port must be an integer with 4 or more digits.
``` ```
With these commands we can see if everything worked well: With these commands we can see if everything worked well:
@ -54,7 +54,7 @@ In order to stop the local deployment, run:
A Jupyter instance often requires data from other services. A Jupyter instance often requires data from other services.
If that data-source is containerized in Docker and sharing a port for communication shouldn't be allowed, e.g., for security reasons, If that data-source is containerized in Docker and sharing a port for communication shouldn't be allowed, e.g., for security reasons,
then connecting the data-source with *gpu-jupyter* within a Docker Swarm is a great option! \ then connecting the data-source with *GPU-Jupyter* within a Docker Swarm is a great option! \
### Set up a Docker Swarm ### Set up a Docker Swarm
@ -74,7 +74,7 @@ Afterwards, check if the registry service is available using `docker service ls`
### Configure the shared Docker network ### Configure the shared Docker network
Additionally, *gpu-jupyter* is connected to the data-source via the same *docker-network*. Therefore, This network must be set to **attachable** in the source's `docker-compose.yml`: Additionally, *GPU-Jupyter* is connected to the data-source via the same *docker-network*. Therefore, This network must be set to **attachable** in the source's `docker-compose.yml`:
```yml ```yml
services: services:
@ -104,7 +104,7 @@ networks:
### Start GPU-Jupyter in Docker Swarm ### Start GPU-Jupyter in Docker Swarm
Finally, *gpu-jupyter* can be deployed in the Docker Swarm with the shared network, using: Finally, *GPU-Jupyter* can be deployed in the Docker Swarm with the shared network, using:
```bash ```bash
./add-to-swarm.sh -p [port] -n [docker-network] ./add-to-swarm.sh -p [port] -n [docker-network]
@ -113,7 +113,7 @@ where:
* port specifies the port on which the service will be available. * port specifies the port on which the service will be available.
* and docker-network is the name of the attachable network from the previous step, e.g., here it is **elk_datastack**. * and docker-network is the name of the attachable network from the previous step, e.g., here it is **elk_datastack**.
Now, *gpu-jupyter* will be accessable on [localhost:port](http://localhost:8888) with the default password `asdf` and shares the network with the other data-source. I.e, all ports of the data-source will be accessable within *gpu-jupyter*, even if they aren't routed it the source's `docker-compose` file. Now, *gpu-jupyter* will be accessable on [localhost:port](http://localhost:8888) with the default password `asdf` and shares the network with the other data-source. I.e, all ports of the data-source will be accessable within *GPU-Jupyter*, even if they aren't routed it the source's `docker-compose` file.
Check if everything works well using: Check if everything works well using:
```bash ```bash
@ -128,10 +128,10 @@ In order to remove the service from the swarm, use:
## Configuration ## Configuration
The password can be set in `src/jupyter_notebook_config.json`. Therefore, hash your Please set a new password using `src/jupyter_notebook_config.json`.
password in the form (password)(salt) using a sha1 hash generator, Therefore, hash your password in the form (password)(salt) using a sha1 hash generator, e.g., the sha1 generator of [sha1-online.com](http://www.sha1-online.com/).
e.g. the sha1 generator of [sha1-online.com](http://www.sha1-online.com/). The input with the default password `asdf` is appended by a arbitrary salt `e49e73b0eb0e` to `asdfe49e73b0eb0e` and should yield the hash string as shown in the config below.
The input with the default password `asdf` and salt `asdfe49e73b0eb0e` should yield the hash string as shown in the config file below. **Never give away your own unhashed password!** **Never give away your own unhashed password!**
Then update the config file as shown below and restart the service. Then update the config file as shown below and restart the service.