8000 Remove version-specific material from setup by trevorcampbell · Pull Request #220 · UBC-DSCI/introduction-to-datascience-python · GitHub
[go: up one dir, main page]

Skip to content

Remove version-specific material from setup #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

10000

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions source/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,16 @@ Occasionally, when you first run Docker on Windows, you will encounter an error

**Running JupyterLab** Run Docker Desktop. Once it is running, you need to download and run the
Docker *image* that we have made available for the worksheets (an *image* is like a "snapshot" of a
computer with all the right packages pre-installed). In the search bar, enter `ubcdsci/py-dsci-100`, as this is
the name of the image. You will be presented
with a few options ({numref}`docker-desktop-search`). In the "Tag" drop down menu, click
the tag `20230720213731d08401` to select the correct version of the image. Then click
the "Pull" button to download the image.
computer with all the right packages pre-installed). You only need to do this step one time; the image will remain
the next time you run Docker Desktop.
In the Docker Desktop search bar, enter `ubcdsci/py-dsci-100`, as this is
the name of the image. You will see the `ubcdsci/py-dsci-100` image in the list ({numref}`docker-desktop-search`),
and "latest" in the Tag drop down menu. We need to change "latest" to the right image version before proceeding.
To find the right tag, open
the [`Dockerfile` in the worksheets repository](https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-python-worksheets/main/Dockerfile),
and look for the line `FROM ubcdsci/py-dsci-100:` followed by the tag consisting of a sequence of numbers and letters.
Back in Docker Desktop, in the "Tag" drop down menu, click that tag to select the correct image version. Then click
the "Pull" button to download the image.

```{figure} img/setup/docker-1.png
---
Expand All @@ -127,8 +132,6 @@ name: docker-desktop-images
The Docker Desktop images tab.
```



To start up a *container* using that image, click the play button beside the
image. This will open the run configuration menu ({numref}`docker-desktop-runconfig`).
Expand the "Optional settings" drop down menu. In the "Host port" textbox, enter
Expand Down Expand Up @@ -196,10 +199,12 @@ sudo chmod u+x get-docker.sh
sudo sh get-docker.sh
```

**Running JupyterLab** In the terminal, navigate to the directory where you want to run JupyterLab, and run
the following command.
**Running JupyterLab** First, open the [`Dockerfile` in the worksheets repository](https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-python-worksheets/main/Dockerfile),
and look for the line `FROM ubcdsci/py-dsci-100:` followed by a tag consisting of a sequence of numbers and letters.
Then in the terminal, navigate to the directory where you want to run JupyterLab, and run
the following command, replacing `TAG` with the *tag* you found earlier.
```
docker run --rm -v $(pwd):/home/jovyan/work -p 8888:8888 ubcdsci/py-dsci-100:20230720213731d08401 jupyter lab
docker run --rm -v $(pwd):/home/jovyan/work -p 8888:8888 ubcdsci/py-dsci-100:TAG jupyter lab
```
The terminal will then print some text as the Docker container starts. Once the text stops scrolling, find the
URL in your terminal that starts with `http://127.0.0.1:8888` (highlighted by the
Expand Down
0