Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:latest AS prebuild
ARG repository_url=https://github.com/Panchos39/Machine-Learning-Introduction.git
RUN apt-get update > /dev/null \
&& apt-get install -y curl unrar git
WORKDIR /downloads
COPY download_data.sh .
RUN ./download_data.sh
RUN git clone $repository_url ML/ \
&& unrar e data.rar ML/data/

FROM jupyter/minimal-notebook:latest
USER $NB_UID
RUN conda install --quiet --yes numpy pandas
WORKDIR /home/$NB_USER
COPY --from=prebuild /downloads/ML ./ML
17 changes: 17 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Minimal Docker configuration

Prebuild:

Install Docker (Docker Desktop)

Build:

```console
./build.sh
```

Run:

```console
./run.sh
```
3 changes: 3 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker build -t jupyter-notebook:1.0 .
6 changes: 6 additions & 0 deletions docker/download_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

file_id="1Wkxfuw2zIfa4yPgVXXtrq4TCURBRu3yG"
filename="data.rar"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${file_id}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${file_id}" -o ${filename}
3 changes: 3 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker run -p 8888:8888 jupyter-notebook:1.0