Skip to content

Commit

Permalink
docs(local-jupyterlab): update skills network extension package name (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ElioDiNino authored Mar 13, 2024
1 parent 6fe8d1e commit a90b008
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions docs/labs/edit-jupyterlab-instructions-computer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ git clone https://gitlab.com/ibm/skills-network/quicklabs/\<Your GP or Course Ti
### Prerequisites
- Have JupyterLab installed ([installation instructions](https://jupyter.org/install)).

### 1. Install skillsnetwork-authoring-extension
On the Extension Marketplace of JupyterLab, search and install ```skillsnetwork-authoring-extension```
### 1. Install skillsnetwork-jupyter-extension
On the Extension Marketplace of JupyterLab, search and install ```skillsnetwork-jupyter-extension```

Or, execute ```pip install skillsnetwork-authoring-extension``` on your terminal.
Or, execute ```pip install skillsnetwork-jupyter-extension``` on your terminal.

### 2. Restart JupyterLab
Restart JupyterLab on your computer by executing on your terminal: ```jupyter lab```
Expand All @@ -55,43 +55,3 @@ Under the ```Skills Network``` tab on JupyterLab select ```Edit a lab```. Then,
Once you are done, click ```Publish``` to publish your lab's instructions.

![Publish Screenshot](/img/labs/edit-lab-instructions/publish-instructions-screenshot.png)

## Editing using SkillsNetwork JupyterLab Docker Image (advanced)

If you want to create your JupyterLab instructions using the same environment that SkillsNetwork labs will use, we recommend using the [SkillsNetwork JupyterLab Docker Image](https://hub.docker.com/r/skillsnetworkbot/jupyterlab-authoring).

> Note: The SkillsNetwork JupyterLab Docker Image requires \~4.5 GB of download data. Once extracted, the image totals \~10GB.
### Prerequisites
- [Docker](https://docs.docker.com/get-docker/) is installed and running.

### Pulling the SkillsNetwork JupyterLab Image:

```bash
docker pull skillsnetworkbot/jupyterlab-authoring:latest
```

### Starting JupyterLab in Your Current Working Directory
```bash
docker run -p 8888:8888 -v "$(pwd)":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root
```

You will then see a link "`http://127.0.0.1:8888/lab`" go to this link in your browser to edit your jupyter lab(s)!

> Note: Don't use the "`http://[RANDOM HASH]:8888/lab`" url, since it won't work.
### Adding sn_jupyterlab alias to rc file (optional, advanced)
It may be annoying to have to type out:
```bash
docker run -p 8888:8888 -v "$(pwd)":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root
```
every time you want to run the SkillsNetwork JupyterLab image in your current working directory.

Alternatively, you can add an alias to your rc file, for example if using `zsh`, add the following to `~/.zshrc` (if using `bash` then replace `~/.zshrc` with `~/.bashrc` in the following instructions):
```bash
alias sn_jupyterlab="docker run -p 8888:8888 -v \"\$(pwd)\":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root"
```

Then run `source ~/.zshrc` to update

Now you can always run the SkillsNetwork JupyterLab image in your current working directory by typing `sn_jupyterlab` in your terminal.

0 comments on commit a90b008

Please sign in to comment.