aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.env28
-rw-r--r--Dockerfile8
-rw-r--r--docker-compose.yml34
-rwxr-xr-xgenerate_token.py17
-rw-r--r--jupyter.pem51
5 files changed, 28 insertions, 110 deletions
diff --git a/.env b/.env
deleted file mode 100644
index 9de96de..0000000
--- a/.env
+++ /dev/null
@@ -1,28 +0,0 @@
-# Define a local data directory
-# Set permissions for the container:
-# sudo chown -R 1000 ${LOCAL_WORKING_DIR}
-
-LOCAL_WORKING_DIR=/data/jupyter/notebooks
-
-# Generate an access token like this
-# import IPython as IPython
-# hash = IPython.lib.passwd("S-E-C-R-E-T")
-# print(hash)
-# You can use the script generate_token.py
-
-ACCESS_TOKEN=sha1:d4c78fe19cb5:0c8f830971d52da9d74b9985a8b87a2b80fc6e6a
-
-# Host port
-PORT=8888
-
-# Provide data sets
-LOCAL_DATASETS=/data/jupyter/datasets
-
-# Provide local modules
-LOCAL_MODULES=/home/git/python_modules
-
-# SSL
-# Generate cert like this:
-# openssl req -x509 -nodes -newkey rsa:2048 -keyout jupyter.pem -out jupyter.pem
-# Copy the jupyter.pem file into the location below.
-LOCAL_SSL_CERTS=/opt/ssl-certs/jupyter
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..90d0cb8
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,8 @@
+FROM alpine:3.15 as certbuilder
+RUN apk add openssl
+WORKDIR /certs
+RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert && cat server.key server.cert > cert.pem
+
+FROM python:3.10.5-slim-buster
+RUN pip install jupyterlab scipy numpy poetry numba torch tensorflow transformers huggingface-hub
+COPY --from=certbuilder /certs /certs
diff --git a/docker-compose.yml b/docker-compose.yml
index 8856451..3d3b61b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,15 +1,21 @@
-version: '3'
+version: '3.8'
services:
- datascience-notebook:
- image: jupyter/datascience-notebook
- volumes:
- - ${LOCAL_WORKING_DIR}:/home/jovyan/work
- - ${LOCAL_DATASETS}:/home/jovyan/work/datasets
- - ${LOCAL_MODULES}:/home/jovyan/work/modules
- - ${LOCAL_SSL_CERTS}:/etc/ssl/notebook
- ports:
- - ${PORT}:8888
- container_name: jupyter_notebook
- command: "start-notebook.sh \
- --NotebookApp.password=${ACCESS_TOKEN} \
- --NotebookApp.certfile=/etc/ssl/notebook/jupyter.pem"
+ jupyterlab_ai:
+ image: devijlab
+ build:
+ context: .
+ volumes:
+ - /home/jupyterlab_docker/datasets:/datasets:ro
+ - /home/jupyterlab_docker/notebooks:/opt/app/data
+ ports:
+ - 8889:8888
+ networks:
+ - devijlab-net
+ entrypoint: ["jupyter", "lab"]
+ command: ["--ip=0.0.0.0", "--port=8888", "--notebook-dir=/opt/app/data", "--allow-root"]
+ environment:
+ - JUPYTER_ENABLE_LAB=yes
+volumes:
+ devijlab-vault:
+networks:
+ devijlab-net:
diff --git a/generate_token.py b/generate_token.py
deleted file mode 100755
index 54e3c39..0000000
--- a/generate_token.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env sh
-import IPython as IPython
-
-if __name__ == "__main__":
- print("Generate a access token")
- from argparse import ArgumentParser
- parser = ArgumentParser()
- parser.add_argument("-p",
- "--password",
- dest="password",
- help="The password you want to use for authentication.",
- required=True)
- args = parser.parse_args()
-
- print("\nCopy this line into the .env file:\n")
- hash = IPython.lib.passwd(args.password)
- print("ACCESS_TOKEN=" + hash)
diff --git a/jupyter.pem b/jupyter.pem
deleted file mode 100644
index 1457bbb..0000000
--- a/jupyter.pem
+++ /dev/null
@@ -1,51 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDtGlWjn9Sw2aV0
-32H7le8Ra2cQRx5cS/m5R8HL0Tl/JlYwLBXNZcsUmnqOKCxJFilkBcj4BIAic5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