REK-proj-2/README.md

64 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2021-06-28 20:18:14 +02:00
# Recommender Systems class - Project 2
## Preparing your system
1. Install [Docker](https://docs.docker.com/engine/install/).
2. Fork this repository to your GitHub account.
2021-06-29 16:15:56 +02:00
3. Pull Jupyter image:
```bash
docker pull jupyter/minimal-notebook:latest
```
4. Run Jupyter docker image:
2021-06-28 20:18:14 +02:00
```bash
docker run \
-d -p 8888:8888 \
-v DIRECTORY:/home/jovyan/REK \
--name REK \
jupyter/minimal-notebook
```
Remember to change **DIRECTORY** to directory where all files can be found. You can change it to `$(pwd)` if your current directory is proper one.
2021-06-29 16:15:56 +02:00
5. Get loging link with following command:
2021-06-28 20:18:14 +02:00
```bash
2021-06-29 16:15:56 +02:00
docker logs REK 2>&1 | grep -o 'http://127.0.0.1:8888/?token.*' | tail -n1
2021-06-28 20:18:14 +02:00
Example output:
http://127.0.0.1:8888/?token=2bb816a4bc36a4bdbf64e0c9a89f336ae5404a01d15e442c
```
2021-06-29 16:15:56 +02:00
If above command did not work. Just find it in logs:
```bash
docker logs REK
```
6. Prepare conda environment:
2021-06-28 20:18:14 +02:00
```bash
docker exec REK bash -c "
2021-06-29 16:15:56 +02:00
conda env create --name REK -f /home/jovyan/REK/environment.yml;
conda run -n REK /bin/bash -c \"
python -m ipykernel install --user --name=REK\""
2021-06-28 20:18:14 +02:00
```
2021-06-29 16:15:56 +02:00
7. You can start/stop container whenever you want:
2021-06-28 20:18:14 +02:00
```bash
docker stop REK
docker start REK
```
If you want to start from scratch, you can remove container:
```bash
docker stop REK
docker rm REK
```
Now you are ready to work!