From 0f534367009e56b5dcba0679404bb3af185f09cb Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:17:12 +0200 Subject: [PATCH 01/84] requirements.txt updated --- Dockerfile | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99c76bd..e4e387b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apk update \ && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev \ && apk add --no-cache curl postgresql postgresql-dev mariadb-connector-c-dev sqlite-dev \ && pip install --no-cache-dir --upgrade uvicorn \ - && pip install --no-cache-dir psycopg2==2.9.5 mysqlclient==2.1.1 pysqlite3==0.5.0 \ + && pip install --no-cache-dir psycopg2==3.1.9 mysqlclient==2.2.0 pysqlite3==0.5.1 \ && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del build-deps diff --git a/requirements.txt b/requirements.txt index a460548..de8c05b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.97.0 +fastapi==0.99.1 uvicorn[standard]==0.22.0 python-jose==3.3.0 pycryptodome==3.18.0 python-dateutil==2.8.2 -sqlalchemy==2.0.16 +sqlalchemy==2.0.17 markdown==3.4.3 python-dotenv==1.0.0 From 576f22333e5003c0682aa8e6aac9f8b30ff3a0fe Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:17:34 +0200 Subject: [PATCH 02/84] docker-compose.yml - added note for TZ --- docker-compose.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3f02cdc..f561a3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,10 @@ version: '3.9' x-dls-variables: &dls-variables - DLS_URL: localhost # REQUIRED, change to your ip or hostname - DLS_PORT: 443 # must match nginx listen & exposed port - LEASE_EXPIRE_DAYS: 90 + TZ: Europe/Berlin # REQUIRED, set your timezone correctly on fastapi-dls AND YOUR CLIENTS !!! + DLS_URL: localhost # REQUIRED, change to your ip or hostname + DLS_PORT: 443 + LEASE_EXPIRE_DAYS: 90 # 90 days is maximum DATABASE: sqlite:////app/database/db.sqlite DEBUG: false From e40f4ce41f430e6c7d861115a66036d1940343ce Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:17:45 +0200 Subject: [PATCH 03/84] updated compatibility list --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d78b1e..21871ad 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Minimal Delegated License Service (DLS). -Compatibility tested with official DLS 2.0.1. +Compatibility tested with official NLS 2.0.1, 2.1.0, 3.1.0. This service can be used without internet connection. Only the clients need a connection to this service on configured port. From 3119d2c7ea5132bf978be99c3ba776768fd8136b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:18:07 +0200 Subject: [PATCH 04/84] added 15.3 to supported drivers list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 21871ad..f6768b4 100644 --- a/README.md +++ b/README.md @@ -417,6 +417,7 @@ Successfully tested with this package versions: | vGPU Suftware | vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------|--------------|----------------|---------------| +| `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | | `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | | `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | | `15.0` | `525.60.12` | `525.60.13` | `527.41` | December 2022 | From 54eaf55ee8816dce38ba5034196043e7624b6a57 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:24:11 +0200 Subject: [PATCH 05/84] refactored docker-compose.yml so very simple example, and moved proxy to "examples" directory --- README.md | 4 +- docker-compose.yml | 110 ++----------------- examples/docker-compose-http-and-https.yml | 120 +++++++++++++++++++++ 3 files changed, 131 insertions(+), 103 deletions(-) create mode 100644 examples/docker-compose-http-and-https.yml diff --git a/README.md b/README.md index f6768b4..698dae2 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/ **Docker-Compose / Deploy stack** -Goto [`docker-compose.yml`](docker-compose.yml) for more advanced example (with reverse proxy usage). +See [`examples`](examples) directory for more advanced examples (with reverse proxy usage). ```yaml version: '3.9' @@ -682,7 +682,7 @@ The error message can safely be ignored (since we have no license limitation :P) <0>:End Logging ``` -#### log with nginx as reverse proxy (see [docker-compose.yml](docker-compose.yml)) +#### log with nginx as reverse proxy (see [docker-compose-http-and-https.yml](examples/docker-compose-http-and-https.yml)) ``` <1>:NLS initialized diff --git a/docker-compose.yml b/docker-compose.yml index f561a3d..506a1a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,108 +14,16 @@ services: restart: always environment: <<: *dls-variables - volumes: - - /etc/timezone:/etc/timezone:ro - - /opt/docker/fastapi-dls/cert:/app/cert # instance.private.pem, instance.public.pem - - db:/app/database - entrypoint: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "/app", "--proxy-headers"] - healthcheck: - test: ["CMD", "curl", "--fail", "http://localhost:8000/-/health"] - interval: 10s - timeout: 5s - retries: 3 - start_period: 30s - proxy: - image: nginx ports: - # thees are ports where nginx (!) is listen to - - "80:80" # for "/leasing/v1/lessor/shutdown" used by windows guests, can't be changed! - - "443:443" # first part must match "DLS_PORT" + - "443:443" volumes: - - /etc/timezone:/etc/timezone:ro - - /opt/docker/fastapi-dls/cert:/opt/cert - healthcheck: - test: ["CMD", "curl", "--insecure", "--fail", "https://localhost/-/health"] - interval: 10s - timeout: 5s - retries: 3 - start_period: 30s - command: | - bash -c "bash -s <<\"EOF\" - cat > /etc/nginx/nginx.conf <<\"EON\" - daemon off; - user root; - worker_processes auto; - - events { - worker_connections 1024; - } - - http { - gzip on; - gzip_disable "msie6"; - include /etc/nginx/mime.types; - - upstream dls-backend { - server dls:8000; # must match dls listen port - } - - server { - listen 443 ssl http2 default_server; - listen [::]:443 ssl http2 default_server; - - root /var/www/html; - index index.html; - server_name _; - - ssl_certificate "/opt/cert/webserver.crt"; - ssl_certificate_key "/opt/cert/webserver.key"; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 10m; - ssl_protocols TLSv1.3 TLSv1.2; - # ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305"; - # ssl_ciphers PROFILE=SYSTEM; - ssl_prefer_server_ciphers on; - - location / { - proxy_set_header Host $$http_host; - proxy_set_header X-Real-IP $$remote_addr; - proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $$scheme; - proxy_pass http://dls-backend$$request_uri; - } - - location = /-/health { - access_log off; - add_header 'Content-Type' 'application/json'; - return 200 '{\"status\":\"up\",\"service\":\"nginx\"}'; - } - } - - server { - listen 80; - listen [::]:80; - - root /var/www/html; - index index.html; - server_name _; - - location /leasing/v1/lessor/shutdown { - proxy_set_header Host $$http_host; - proxy_set_header X-Real-IP $$remote_addr; - proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $$scheme; - proxy_pass http://dls-backend/leasing/v1/lessor/shutdown; - } - - location / { - return 301 https://$$host$$request_uri; - } - } - } - EON - nginx - EOF" + - /opt/docker/fastapi-dls/cert:/app/cert + - dls-db:/app/database + logging: # optional, for those who do not need logs + driver: "json-file" + options: + max-file: 5 + max-size: 10m volumes: - db: + dls-db: diff --git a/examples/docker-compose-http-and-https.yml b/examples/docker-compose-http-and-https.yml new file mode 100644 index 0000000..3f02cdc --- /dev/null +++ b/examples/docker-compose-http-and-https.yml @@ -0,0 +1,120 @@ +version: '3.9' + +x-dls-variables: &dls-variables + DLS_URL: localhost # REQUIRED, change to your ip or hostname + DLS_PORT: 443 # must match nginx listen & exposed port + LEASE_EXPIRE_DAYS: 90 + DATABASE: sqlite:////app/database/db.sqlite + DEBUG: false + +services: + dls: + image: collinwebdesigns/fastapi-dls:latest + restart: always + environment: + <<: *dls-variables + volumes: + - /etc/timezone:/etc/timezone:ro + - /opt/docker/fastapi-dls/cert:/app/cert # instance.private.pem, instance.public.pem + - db:/app/database + entrypoint: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "/app", "--proxy-headers"] + healthcheck: + test: ["CMD", "curl", "--fail", "http://localhost:8000/-/health"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 30s + proxy: + image: nginx + ports: + # thees are ports where nginx (!) is listen to + - "80:80" # for "/leasing/v1/lessor/shutdown" used by windows guests, can't be changed! + - "443:443" # first part must match "DLS_PORT" + volumes: + - /etc/timezone:/etc/timezone:ro + - /opt/docker/fastapi-dls/cert:/opt/cert + healthcheck: + test: ["CMD", "curl", "--insecure", "--fail", "https://localhost/-/health"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 30s + command: | + bash -c "bash -s <<\"EOF\" + cat > /etc/nginx/nginx.conf <<\"EON\" + daemon off; + user root; + worker_processes auto; + + events { + worker_connections 1024; + } + + http { + gzip on; + gzip_disable "msie6"; + include /etc/nginx/mime.types; + + upstream dls-backend { + server dls:8000; # must match dls listen port + } + + server { + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + root /var/www/html; + index index.html; + server_name _; + + ssl_certificate "/opt/cert/webserver.crt"; + ssl_certificate_key "/opt/cert/webserver.key"; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 10m; + ssl_protocols TLSv1.3 TLSv1.2; + # ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305"; + # ssl_ciphers PROFILE=SYSTEM; + ssl_prefer_server_ciphers on; + + location / { + proxy_set_header Host $$http_host; + proxy_set_header X-Real-IP $$remote_addr; + proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $$scheme; + proxy_pass http://dls-backend$$request_uri; + } + + location = /-/health { + access_log off; + add_header 'Content-Type' 'application/json'; + return 200 '{\"status\":\"up\",\"service\":\"nginx\"}'; + } + } + + server { + listen 80; + listen [::]:80; + + root /var/www/html; + index index.html; + server_name _; + + location /leasing/v1/lessor/shutdown { + proxy_set_header Host $$http_host; + proxy_set_header X-Real-IP $$remote_addr; + proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $$scheme; + proxy_pass http://dls-backend/leasing/v1/lessor/shutdown; + } + + location / { + return 301 https://$$host$$request_uri; + } + } + } + EON + nginx + EOF" + +volumes: + db: From f576ded038fc87c7aa48c43640b2502c23d90c03 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:33:30 +0200 Subject: [PATCH 06/84] fixed versions --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e4e387b..2d1c745 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apk update \ && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev \ && apk add --no-cache curl postgresql postgresql-dev mariadb-connector-c-dev sqlite-dev \ && pip install --no-cache-dir --upgrade uvicorn \ - && pip install --no-cache-dir psycopg2==3.1.9 mysqlclient==2.2.0 pysqlite3==0.5.1 \ + && pip install --no-cache-dir psycopg2==2.9.6 mysqlclient==2.2.0 pysqlite3==0.5.1 \ && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del build-deps From fb1dbea1eea6e4428189d46012582ee72632eef4 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 10:46:51 +0200 Subject: [PATCH 07/84] added missing "pkg-config" for "mysqlclient==2.2.0" ref. https://stackoverflow.com/questions/76533384/docker-alpine-build-fails-on-mysqlclient-installation-with-error-exception-can --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2d1c745..4022871 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN echo -e "VERSION=$VERSION\nCOMMIT=$COMMIT" > /version.env COPY requirements.txt /tmp/requirements.txt RUN apk update \ - && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev \ + && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev pkgconf \ && apk add --no-cache curl postgresql postgresql-dev mariadb-connector-c-dev sqlite-dev \ && pip install --no-cache-dir --upgrade uvicorn \ && pip install --no-cache-dir psycopg2==2.9.6 mysqlclient==2.2.0 pysqlite3==0.5.1 \ From e6595c05d5d18f009c8d0d748610c3e02dc306a6 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 11:06:00 +0200 Subject: [PATCH 08/84] fixed mariadb-client installation ref. https://github.com/PyMySQL/mysqlclient/discussions/624 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4022871..14d53b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ RUN echo -e "VERSION=$VERSION\nCOMMIT=$COMMIT" > /version.env COPY requirements.txt /tmp/requirements.txt RUN apk update \ - && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev pkgconf \ - && apk add --no-cache curl postgresql postgresql-dev mariadb-connector-c-dev sqlite-dev \ + && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev pkgconfig \ + && apk add --no-cache curl postgresql postgresql-dev mariadb-dev sqlite-dev \ && pip install --no-cache-dir --upgrade uvicorn \ && pip install --no-cache-dir psycopg2==2.9.6 mysqlclient==2.2.0 pysqlite3==0.5.1 \ && pip install --no-cache-dir -r /tmp/requirements.txt \ From 4c8c2ed3d640d73664c3427b53f0a1afc4952fc2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 11:55:26 +0200 Subject: [PATCH 09/84] fixed "deploy:pacman" --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eac63af..ac2bedc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,7 +331,6 @@ deploy:pacman: artifacts: true script: - source .PKGBUILD/PKGBUILD - - source version.env # fastapi-dls-1.0-1-any.pkg.tar.zst - BUILD_NAME=${pkgname}-${CI_COMMIT_REF_NAME}-${pkgrel}-any.pkg.tar.zst - PACKAGE_NAME=${pkgname} From 45545953ed6c3e34d50148c59b7615e0586c7769 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:19:07 +0200 Subject: [PATCH 10/84] improvements thanks to @AbsolutelyFree (https://gitea.publichub.eu/oscar.krause/fastapi-dls/issues/1) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 698dae2..6102fb1 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/ See [`examples`](examples) directory for more advanced examples (with reverse proxy usage). +> Adjust *REQUIRED* variables as needed + ```yaml version: '3.9' @@ -152,6 +154,8 @@ su - www-data -c "/opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fast **Create config file** +> Adjust `DLS_URL` as needed (accessing from LAN won't work with 127.0.0.1) + ```shell mkdir /etc/fastapi-dls cat </etc/fastapi-dls/env @@ -254,10 +258,11 @@ su - ${SERVICE_USER} -c "${BASE_DIR}/venv/bin/uvicorn main:app --app-dir=${BASE_ **Create config file** +> Adjust `DLS_URL` as needed (accessing from LAN won't work with 127.0.0.1) + ```shell BASE_DIR=/opt/fastapi-dls cat </etc/fastapi-dls/env -# Adjust DSL_URL as needed (accessing from LAN won't work with 127.0.0.1) DLS_URL=127.0.0.1 DLS_PORT=443 LEASE_EXPIRE_DAYS=90 @@ -332,6 +337,7 @@ apt-get install -f --fix-missing ``` Start with `systemctl start fastapi-dls.service` and enable autostart with `systemctl enable fastapi-dls.service`. +Now you have to edit `/etc/fastapi-dls/env` as needed. ## ArchLinux (using `pacman`) @@ -353,6 +359,7 @@ pacman -U --noconfirm fastapi-dls.pkg.tar.zst ``` Start with `systemctl start fastapi-dls.service` and enable autostart with `systemctl enable fastapi-dls.service`. +Now you have to edit `/etc/default/fastapi-dls` as needed. ## unRAID From c1eaa33d9ef1f325d34378f714d459127416eb43 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:22:22 +0200 Subject: [PATCH 11/84] added docker command to logging section thanks to @libreshare (https://gitea.publichub.eu/oscar.krause/fastapi-dls/issues/2) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6102fb1..92f7365 100644 --- a/README.md +++ b/README.md @@ -566,6 +566,10 @@ There are many other internal api endpoints for handling authentication and leas **Please make sure that fastapi-dls and your guests are on the same timezone!** +## Docker + +Logs are available with `docker logs `. To get the correct container-id use `docker container ls` or `docker ps`. + ## Linux Logs are available with `journalctl -u nvidia-gridd -f`. From 7380e4328e6addf3620952c36099adeab9514452 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:38:54 +0200 Subject: [PATCH 12/84] removed mysql from included docker drivers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92f7365..3927bee 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Docker-Images are available here: - [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest` - [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls/main:latest` -The images include database drivers for `postgres`, `mysql`, `mariadb` and `sqlite`. +The images include database drivers for `postgres`, `mariadb` and `sqlite`. **Run this on the Docker-Host** From 10caf2310c265850db6c341e38bb6573732beb14 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:39:13 +0200 Subject: [PATCH 13/84] added information about ipv6 may be must disabled --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3927bee..c11a149 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Only the clients need a connection to this service on configured port. - 256mb ram - 4gb hdd +- *maybe IPv6 must be disabled* Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb ram and 750mb hdd. @@ -566,6 +567,8 @@ There are many other internal api endpoints for handling authentication and leas **Please make sure that fastapi-dls and your guests are on the same timezone!** +Maybe you have to disable IPv6 on the machine you are running FastAPI-DLS. + ## Docker Logs are available with `docker logs `. To get the correct container-id use `docker container ls` or `docker ps`. From c02ca762ea9e0c4169d0ff82d0ac44bac7cf69d5 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:42:19 +0200 Subject: [PATCH 14/84] typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c11a149..9c3ed9a 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,7 @@ only gets a valid local license.
- Log + Log example **Display-Container-LS** From d4267f3ee618bc88851d77c1adf474bb9531cffa Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:42:31 +0200 Subject: [PATCH 15/84] toggle api endpoints --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9c3ed9a..191ced4 100644 --- a/README.md +++ b/README.md @@ -511,6 +511,9 @@ Done. For more information check [troubleshoot section](#troubleshoot). # Endpoints +
+ show + ### `GET /` Redirect to `/-/readme`. @@ -562,6 +565,7 @@ Generate client token, (see [installation](#installation)). ### Others There are many other internal api endpoints for handling authentication and lease process. +
# Troubleshoot From a4e98dae46ceeb0d25a5662562083d885f17168f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 13:42:21 +0200 Subject: [PATCH 16/84] fixed docker image path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac2bedc..8d7160f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -269,7 +269,7 @@ deploy:docker: script: - echo "========== GitLab-Registry ==========" - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME + - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest - docker push $IMAGE:$CI_COMMIT_REF_NAME From 7ae1201c8fdb903e8342c2d9f6c2968f8e69b84e Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 13:43:15 +0200 Subject: [PATCH 17/84] fixed new docker registry image path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 191ced4..99b4ab7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb Docker-Images are available here: - [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest` -- [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls/main:latest` +- [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls:latest` The images include database drivers for `postgres`, `mariadb` and `sqlite`. From eca64fb1d51f891f16c7faf10dd4090949c333e1 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 17:47:10 +0200 Subject: [PATCH 18/84] push multiarch image to docker-hub --- .gitlab-ci.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eac63af..1ee7f07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,9 @@ include: cache: key: one-key-to-rule-them-all +variables: + DOCKER_BUILDX_PLATFORM: "linux/amd64,linux/arm64" + build:docker: image: docker:dind interruptible: true @@ -25,7 +28,7 @@ build:docker: script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA - - docker buildx build --progress=plain --platform linux/amd64,linux/arm64 --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE --push . + - docker buildx build --progress=plain --platform $DOCKER_BUILDX_PLATFORM --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE --push . - docker buildx imagetools inspect $IMAGE - echo "CS_IMAGE=$IMAGE" > container_scanning.env artifacts: @@ -270,17 +273,13 @@ deploy:docker: - echo "========== GitLab-Registry ==========" - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME - - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME - - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest - - docker push $IMAGE:$CI_COMMIT_REF_NAME - - docker push $IMAGE:latest + - docker buildx build --progress=plain --platform $DOCKER_BUILDX_PLATFORM --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME --push . + - docker buildx build --progress=plain --platform $DOCKER_BUILDX_PLATFORM --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest --push . - echo "========== Docker-Hub ==========" - docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN - IMAGE=$PUBLIC_REGISTRY_USER/$CI_PROJECT_NAME - - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME - - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest - - docker push $IMAGE:$CI_COMMIT_REF_NAME - - docker push $IMAGE:latest + - docker buildx build --progress=plain --platform $DOCKER_BUILDX_PLATFORM --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME --push . + - docker buildx build --progress=plain --platform $DOCKER_BUILDX_PLATFORM --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest --push . deploy:apt: # doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package From fec099ae8102af8ed36de21e7b97c70b028c7b5b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 10 Jul 2023 13:32:23 +0200 Subject: [PATCH 19/84] added support for 16.0 drivers to readme --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 99b4ab7..c015f78 100644 --- a/README.md +++ b/README.md @@ -423,14 +423,15 @@ client has 19.2 hours in which to re-establish connectivity before its license e Successfully tested with this package versions: -| vGPU Suftware | vGPU Manager | Linux Driver | Windows Driver | Release Date | -|---------------|--------------|--------------|----------------|---------------| -| `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | -| `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | -| `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | -| `15.0` | `525.60.12` | `525.60.13` | `527.41` | December 2022 | -| `14.4` | `510.108.03` | `510.108.03` | `514.08` | December 2022 | -| `14.3` | `510.108.03` | `510.108.03` | `513.91` | November 2022 | +| vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | +|---------------|--------------------|--------------|----------------|---------------| +| `16.0` | `535.54.06` | `535.54.03` | `536.25` | July 2023 | +| `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | +| `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | +| `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | +| `15.0` | `525.60.12` | `525.60.13` | `527.41` | December 2022 | +| `14.4` | `510.108.03` | `510.108.03` | `514.08` | December 2022 | +| `14.3` | `510.108.03` | `510.108.03` | `513.91` | November 2022 | - https://docs.nvidia.com/grid/index.html From 2d7909546d7fb8b7d8bcab1571d645b3494fd44b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 10 Jul 2023 18:47:46 +0200 Subject: [PATCH 20/84] requirements.txt updated --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index de8c05b..76e9181 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.99.1 +fastapi==0.100.0 uvicorn[standard]==0.22.0 python-jose==3.3.0 pycryptodome==3.18.0 python-dateutil==2.8.2 -sqlalchemy==2.0.17 +sqlalchemy==2.0.18 markdown==3.4.3 python-dotenv==1.0.0 From 7480cb4cf7e0f9ab833a8aca58290919094f7baa Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jul 2023 06:46:27 +0200 Subject: [PATCH 21/84] added linkt to driver compatibility section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c015f78..ece6be6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Minimal Delegated License Service (DLS). -Compatibility tested with official NLS 2.0.1, 2.1.0, 3.1.0. +Compatibility tested with official NLS 2.0.1, 2.1.0, 3.1.0. For Driver compatibility see [here](#setup-client). This service can be used without internet connection. Only the clients need a connection to this service on configured port. From 3e9d7c006185b623b0bf319b9b066d8c890a3fd7 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 26 Sep 2023 07:08:12 +0200 Subject: [PATCH 22/84] added Docker supported system architectures --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ece6be6..9f60b16 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb ## Docker -Docker-Images are available here: +Docker-Images are available here for Intel (x86), AMD (amd64) and ARM (arm64): - [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest` - [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls:latest` From 4b16b02a7d0a8c4f5c87c386de5413339f225849 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 26 Sep 2023 07:08:41 +0200 Subject: [PATCH 23/84] added macOS as supported host (using python-venv) --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f60b16..b4a6147 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,10 @@ volumes: dls-db: ``` -## Debian/Ubuntu (manual method using `git clone` and python virtual environment) +## Debian/Ubuntu/macOS (manual method using `git clone` and python virtual environment) -Tested on `Debian 11 (bullseye)`, Ubuntu may also work. +Tested on `Debian 11 (bullseye)` and `macOS Ventura (13.6)`, Ubuntu may also work. **Please note that setup on macOS +differs from Debian based systems.** **Make sure you are logged in as root.** From 713e33eed1c8c730080ac33dafe62f3471a26d76 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 26 Sep 2023 07:08:58 +0200 Subject: [PATCH 24/84] added 16.1 as supported nvidia driver release --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b4a6147..9fc8f03 100644 --- a/README.md +++ b/README.md @@ -426,7 +426,8 @@ Successfully tested with this package versions: | vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------------|--------------|----------------|---------------| -| `16.0` | `535.54.06` | `535.54.03` | `536.25` | July 2023 | +| `16.1` | `535.54.06` | `535.54.03` | `536.25` | August 2023 | +| `16.0` | `535.104.06` | `535.104.05` | `537.13` | July 2023 | | `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | | `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | | `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | From 9512e29ed980e0d673482fc7f265a01da340a653 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 26 Sep 2023 07:09:06 +0200 Subject: [PATCH 25/84] requirements.txt updated --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 76e9181..4178b56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.100.0 -uvicorn[standard]==0.22.0 +fastapi==0.103.1 +uvicorn[standard]==0.23.2 python-jose==3.3.0 -pycryptodome==3.18.0 +pycryptodome==3.19.0 python-dateutil==2.8.2 -sqlalchemy==2.0.18 -markdown==3.4.3 +sqlalchemy==2.0.21 +markdown==3.4.4 python-dotenv==1.0.0 From 51b28dcdc3b5a040d406a867dbbaa0d318619498 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 16 Oct 2023 09:50:24 +0200 Subject: [PATCH 26/84] updated ubuntu from 22.10 (EOL) to 23.04 --- .gitlab-ci.yml | 2 +- README.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37ac17b..a60359d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,7 +193,7 @@ test:debian: test:ubuntu: extends: .test:linux - image: ubuntu:22.10 + image: ubuntu:23.04 test:archlinux: image: archlinux:base diff --git a/README.md b/README.md index 9fc8f03..34b02fc 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Only the clients need a connection to this service on configured port. - 4gb hdd - *maybe IPv6 must be disabled* -Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb ram and 750mb hdd. +Tested with Ubuntu 22.10 (EOL!) (from Proxmox templates), actually its consuming 100mb ram and 750mb hdd. **Prepare your system** @@ -318,7 +318,8 @@ Packages are available here: Successful tested with: - Debian 12 (Bookworm) -- Ubuntu 22.10 (Kinetic Kudu) +- Ubuntu 22.10 (Kinetic Kudu) (EOL!) +- Ubuntu 23.04 (Lunar) Not working with: From 995dbdac808ec261cb1c27841261ba9d84a90b42 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 25 Oct 2023 07:30:57 +0200 Subject: [PATCH 27/84] README.md updated --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 34b02fc..5eacbaa 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,8 @@ volumes: ## Debian/Ubuntu/macOS (manual method using `git clone` and python virtual environment) -Tested on `Debian 11 (bullseye)` and `macOS Ventura (13.6)`, Ubuntu may also work. **Please note that setup on macOS -differs from Debian based systems.** +Tested on `Debian 11 (bullseye)`, `Debian 12 (bookworm)` and `macOS Ventura (13.6)`, Ubuntu may also work. +**Please note that setup on macOS differs from Debian based systems.** **Make sure you are logged in as root.** From 01fd954252721782cadc9a57fc891a32e22149b0 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 25 Oct 2023 07:31:29 +0200 Subject: [PATCH 28/84] implemented python test matrix for different python dependencies on different os releases --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a60359d..2280cf1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,8 +134,14 @@ test: - if: $CI_PIPELINE_SOURCE == "merge_request_event" variables: DATABASE: sqlite:///../app/db.sqlite + parallel: + matrix: + - REQUIREMENTS: + - requirements.txt + - .DEBIAN/requirements-bookworm-12.txt + - .DEBIAN/requirements-ubuntu-23.04.txt before_script: - - pip install -r requirements.txt + - pip install -r $REQUIREMENTS - pip install pytest httpx - mkdir -p app/cert - openssl genrsa -out app/cert/instance.private.pem 2048 From 6f9107087b16674a1725057891286ee9cb0ddcc3 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 25 Oct 2023 07:36:17 +0200 Subject: [PATCH 29/84] added os specific requirements.txt --- .DEBIAN/requirements-bookworm-12.txt | 11 +++++++++++ .DEBIAN/requirements-ubuntu-23.04.txt | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .DEBIAN/requirements-bookworm-12.txt create mode 100644 .DEBIAN/requirements-ubuntu-23.04.txt diff --git a/.DEBIAN/requirements-bookworm-12.txt b/.DEBIAN/requirements-bookworm-12.txt new file mode 100644 index 0000000..4819f80 --- /dev/null +++ b/.DEBIAN/requirements-bookworm-12.txt @@ -0,0 +1,11 @@ +# https://packages.debian.org/hu/ +fastapi==0.92.0 +uvicorn[standard]==0.17.6 +python-jose[pycryptodome]==3.3.0 +pycryptodome==3.11.0 +python-dateutil==2.8.2 +sqlalchemy==1.3.22 +markdown==3.4.1 +python-dotenv==0.21.0 +jinja2==3.0.3 +httpx==0.23.3 diff --git a/.DEBIAN/requirements-ubuntu-23.04.txt b/.DEBIAN/requirements-ubuntu-23.04.txt new file mode 100644 index 0000000..f2d4b05 --- /dev/null +++ b/.DEBIAN/requirements-ubuntu-23.04.txt @@ -0,0 +1,10 @@ +# https://packages.ubuntu.com +fastapi==0.91.0 +uvicorn[standard]==0.15.0 +python-jose[pycryptodome]==3.3.0 +pycryptodome==3.11.0 +python-dateutil==2.8.2 +sqlalchemy==1.4.46 +markdown==3.4.3 +python-dotenv==0.21.0 +jinja2==3.1.2 From dc33c29158675605431be46712716589a19ed84d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 08:23:07 +0100 Subject: [PATCH 30/84] fixed versions & added 16.2 as supported --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5eacbaa..86c7b34 100644 --- a/README.md +++ b/README.md @@ -427,8 +427,9 @@ Successfully tested with this package versions: | vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------------|--------------|----------------|---------------| -| `16.1` | `535.54.06` | `535.54.03` | `536.25` | August 2023 | -| `16.0` | `535.104.06` | `535.104.05` | `537.13` | July 2023 | +| `16.2` | `535.129.03` | `535.129.03` | `537.70` | October 2023 | +| `16.1` | `535.104.06` | `535.104.05` | `537.13` | August 2023 | +| `16.0` | `535.54.06` | `535.54.03` | `536.22` | July 2023 | | `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | | `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | | `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | From b11579de98219fb67fe7e94e907b20c71364549d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 09:28:23 +0100 Subject: [PATCH 31/84] fixed debian package versions --- .DEBIAN/requirements-bookworm-12.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.DEBIAN/requirements-bookworm-12.txt b/.DEBIAN/requirements-bookworm-12.txt index 4819f80..6b107fe 100644 --- a/.DEBIAN/requirements-bookworm-12.txt +++ b/.DEBIAN/requirements-bookworm-12.txt @@ -4,7 +4,7 @@ uvicorn[standard]==0.17.6 python-jose[pycryptodome]==3.3.0 pycryptodome==3.11.0 python-dateutil==2.8.2 -sqlalchemy==1.3.22 +sqlalchemy==1.4.46 markdown==3.4.1 python-dotenv==0.21.0 jinja2==3.0.3 From ee50ede2ea96238386719076543e6005b5bc5aa9 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 10:49:06 +0100 Subject: [PATCH 32/84] fixes --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2280cf1..d87c863 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -141,6 +141,7 @@ test: - .DEBIAN/requirements-bookworm-12.txt - .DEBIAN/requirements-ubuntu-23.04.txt before_script: + - apt-get update && apt-get install -y python3-dev - pip install -r $REQUIREMENTS - pip install pytest httpx - mkdir -p app/cert From 3ef14e5522f30db4250bfa029483abf155c490ee Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 11:41:44 +0100 Subject: [PATCH 33/84] added gcc as dependency --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d87c863..627051b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -141,7 +141,7 @@ test: - .DEBIAN/requirements-bookworm-12.txt - .DEBIAN/requirements-ubuntu-23.04.txt before_script: - - apt-get update && apt-get install -y python3-dev + - apt-get update && apt-get install -y python3-dev gcc - pip install -r $REQUIREMENTS - pip install pytest httpx - mkdir -p app/cert From 948934ad0ead761e9210b47f1e7e9bb689c89067 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 12:53:50 +0100 Subject: [PATCH 34/84] fixed testing dependency --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 627051b..6f528b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,6 +142,7 @@ test: - .DEBIAN/requirements-ubuntu-23.04.txt before_script: - apt-get update && apt-get install -y python3-dev gcc + - pip install cython - pip install -r $REQUIREMENTS - pip install pytest httpx - mkdir -p app/cert From 236948e483685c4c36f2465fb19bd31f27fd2431 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 3 Nov 2023 14:03:48 +0100 Subject: [PATCH 35/84] updated test to debian bookworm --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f528b2..022ebd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ build:pacman: - "*.pkg.tar.zst" test: - image: python:3.11-slim-bullseye + image: python:3.11-slim-bookworm stage: test rules: - if: $CI_COMMIT_BRANCH From f97ee9c8fc68552aeb167b9c6677caf2368a158f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 12 Jan 2024 14:25:03 +0100 Subject: [PATCH 36/84] updated debian bookworm 12 dependencies --- .DEBIAN/requirements-bookworm-12.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.DEBIAN/requirements-bookworm-12.txt b/.DEBIAN/requirements-bookworm-12.txt index 6b107fe..223c64c 100644 --- a/.DEBIAN/requirements-bookworm-12.txt +++ b/.DEBIAN/requirements-bookworm-12.txt @@ -7,5 +7,5 @@ python-dateutil==2.8.2 sqlalchemy==1.4.46 markdown==3.4.1 python-dotenv==0.21.0 -jinja2==3.0.3 +jinja2==3.1.2 httpx==0.23.3 From e9ad1d77910bd9cfd338fddfa1a9e9b61a18c72e Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 12 Jan 2024 14:53:17 +0100 Subject: [PATCH 37/84] requirements.txt updated --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4178b56..68afc4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.103.1 -uvicorn[standard]==0.23.2 +fastapi==0.109.0 +uvicorn[standard]==0.25.0 python-jose==3.3.0 -pycryptodome==3.19.0 +pycryptodome==3.20.0 python-dateutil==2.8.2 -sqlalchemy==2.0.21 -markdown==3.4.4 +sqlalchemy==2.0.25 +markdown==3.5.2 python-dotenv==1.0.0 From 9473f10653ca9ff5ecaa79ca96af2d20e7f82460 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 08:08:37 +0100 Subject: [PATCH 38/84] added tests for Ubuntu "Mantic Minotaur" --- .DEBIAN/requirements-ubuntu-23.10.txt | 10 ++++++++++ .gitlab-ci.yml | 3 ++- README.md | 5 +++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .DEBIAN/requirements-ubuntu-23.10.txt diff --git a/.DEBIAN/requirements-ubuntu-23.10.txt b/.DEBIAN/requirements-ubuntu-23.10.txt new file mode 100644 index 0000000..4cab03f --- /dev/null +++ b/.DEBIAN/requirements-ubuntu-23.10.txt @@ -0,0 +1,10 @@ +# https://packages.ubuntu.com +fastapi==0.101.0 +uvicorn[standard]==0.23.2 +python-jose[pycryptodome]==3.3.0 +pycryptodome==3.11.0 +python-dateutil==2.8.2 +sqlalchemy==1.4.47 +markdown==3.4.4 +python-dotenv==1.0.0 +jinja2==3.1.2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 022ebd7..3130f5f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -140,6 +140,7 @@ test: - requirements.txt - .DEBIAN/requirements-bookworm-12.txt - .DEBIAN/requirements-ubuntu-23.04.txt + - .DEBIAN/requirements-ubuntu-23.10.txt before_script: - apt-get update && apt-get install -y python3-dev gcc - pip install cython @@ -201,7 +202,7 @@ test:debian: test:ubuntu: extends: .test:linux - image: ubuntu:23.04 + image: ubuntu:23.10 test:archlinux: image: archlinux:base diff --git a/README.md b/README.md index 86c7b34..5bd6af9 100644 --- a/README.md +++ b/README.md @@ -318,8 +318,9 @@ Packages are available here: Successful tested with: - Debian 12 (Bookworm) -- Ubuntu 22.10 (Kinetic Kudu) (EOL!) -- Ubuntu 23.04 (Lunar) +- Ubuntu 22.10 (Kinetic Kudu) (EOL: July 20, 2023) +- Ubuntu 23.04 (Lunar Lobster) (EOL: January 2024) +- Ubuntu 23.10 (Mantic Minotaur) (EOL: July 2024) Not working with: From 3bdfc94527d053417eaefb71f9a5d67a76b569bc Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 09:33:58 +0100 Subject: [PATCH 39/84] removed tests for "23.04" > gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-sazb8fvo/httptools_694f06fa2e354ed9ba9f5c167df7fce4/vendor/llhttp/include -I/tmp/pip-install-sazb8fvo/httptools_694f06fa2e354ed9ba9f5c167df7fce4/vendor/llhttp/src -I/usr/local/include/python3.11 -c httptools/parser/parser.c -o build/temp.linux-x86_64-cpython-311/httptools/parser/parser.o -O2 httptools/parser/parser.c:212:12: fatal error: longintrepr.h: No such file or directory --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3130f5f..2755ced 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,7 +139,6 @@ test: - REQUIREMENTS: - requirements.txt - .DEBIAN/requirements-bookworm-12.txt - - .DEBIAN/requirements-ubuntu-23.04.txt - .DEBIAN/requirements-ubuntu-23.10.txt before_script: - apt-get update && apt-get install -y python3-dev gcc From c7f354d50c023e63e5af0f9d1329401c3da723df Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 11:33:22 +0100 Subject: [PATCH 40/84] removed "cython" from "test" --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2755ced..920a8b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,7 +142,6 @@ test: - .DEBIAN/requirements-ubuntu-23.10.txt before_script: - apt-get update && apt-get install -y python3-dev gcc - - pip install cython - pip install -r $REQUIREMENTS - pip install pytest httpx - mkdir -p app/cert From 22110df7911a173bb6eebbe90b462225c9ad1fc3 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 22:37:33 +0100 Subject: [PATCH 41/84] =?UTF-8?q?added=20code=5Fquality=20=E2=80=9CSOURCE?= =?UTF-8?q?=5FCODE=E2=80=9D=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 920a8b0..10b9bb0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -218,6 +218,8 @@ test:archlinux: - pacman -U --noconfirm *.pkg.tar.zst code_quality: + variables: + SOURCE_CODE: app rules: - if: $CODE_QUALITY_DISABLED when: never From 21d052523faaef6bd64f6ed41f0b8672444d9b43 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 22:43:47 +0100 Subject: [PATCH 42/84] added code_quality debug --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10b9bb0..4982492 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,6 +220,8 @@ test:archlinux: code_quality: variables: SOURCE_CODE: app + CODECLIMATE_DEBUG: 1 + REPORT_STDOUT: 1 rules: - if: $CODE_QUALITY_DISABLED when: never From d37d96dc34531d544412ca9149cc380280e0f777 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 23:05:57 +0100 Subject: [PATCH 43/84] fixed test_coverage (fail on matrix) --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4982492..07e57f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -242,10 +242,22 @@ semgrep-sast: - if: $CI_PIPELINE_SOURCE == "merge_request_event" test_coverage: - extends: test +# extends: test + image: python:3.11-slim-bookworm allow_failure: true + stage: test rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" + variables: + DATABASE: sqlite:///../app/db.sqlite + before_script: + - apt-get update && apt-get install -y python3-dev gcc + - pip install -r requirements.txt + - pip install pytest httpx + - mkdir -p app/cert + - openssl genrsa -out app/cert/instance.private.pem 2048 + - openssl rsa -in app/cert/instance.private.pem -outform PEM -pubout -out app/cert/instance.public.pem + - cd test script: - pip install pytest pytest-cov - coverage run -m pytest main.py From af8b1c23876e20d92960261511e4839ccf928ade Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 17 Jan 2024 23:13:20 +0100 Subject: [PATCH 44/84] Update .codeclimate.yml --- .codeclimate.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index 09c810c..2f7e959 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,7 +1,11 @@ +version: "2" plugins: bandit: enabled: true sonar-python: enabled: true + config: + tests_patterns: + - test/** pylint: enabled: true From d3c4dc3fb76868b2a6b552526d08ac2cbeb66887 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 08:34:43 +0100 Subject: [PATCH 45/84] disabled code_quality debug --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07e57f0..7c7693f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,8 +220,6 @@ test:archlinux: code_quality: variables: SOURCE_CODE: app - CODECLIMATE_DEBUG: 1 - REPORT_STDOUT: 1 rules: - if: $CODE_QUALITY_DISABLED when: never From 9c686913dd3411b14187b2f95d1a5f094d951b8a Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 12:46:51 +0100 Subject: [PATCH 46/84] disabled pylint --- .codeclimate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 2f7e959..931aa68 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -7,5 +7,5 @@ plugins: config: tests_patterns: - test/** - pylint: - enabled: true +# pylint: +# enabled: true From 867cd7018ae5bfd385de64bf0309e3727adf6044 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 12:58:43 +0100 Subject: [PATCH 47/84] removed pylint --- .codeclimate.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 931aa68..fd7ed1f 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -7,5 +7,3 @@ plugins: config: tests_patterns: - test/** -# pylint: -# enabled: true From 2baaeb561b3897e128e02b3783aa1135f4577c29 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 12:59:06 +0100 Subject: [PATCH 48/84] run different jobs on "$CI_DEFAULT_BRANCH" --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c7693f..94ea964 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -224,6 +224,7 @@ code_quality: - if: $CODE_QUALITY_DISABLED when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH secret_detection: rules: @@ -238,6 +239,7 @@ semgrep-sast: - if: $SAST_DISABLED when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH test_coverage: # extends: test @@ -280,6 +282,7 @@ gemnasium-python-dependency_scanning: - if: $DEPENDENCY_SCANNING_DISABLED when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .deploy: rules: From 46f6c9fe997908883514899a1656405a5f2d0d27 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 13:06:45 +0100 Subject: [PATCH 49/84] fixed CI/CD path from "/builds" to "/tmp/builds" --- .PKGBUILD/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.PKGBUILD/PKGBUILD b/.PKGBUILD/PKGBUILD index 3913360..f1ed955 100644 --- a/.PKGBUILD/PKGBUILD +++ b/.PKGBUILD/PKGBUILD @@ -12,7 +12,7 @@ depends=('python' 'python-jose' 'python-starlette' 'python-httpx' 'python-fastap provider=("$pkgname") install="$pkgname.install" backup=('etc/default/fastapi-dls') -source=('git+file:///builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git +source=('git+file:///tmp/builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git "$pkgname.default" "$pkgname.service" "$pkgname.tmpfiles") From 6aa197dcaebb9b437004cdcde8e0d7f0df12e552 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 13:09:30 +0100 Subject: [PATCH 50/84] only run test matrix when "app" or "test" changes --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94ea964..4ef1a94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,9 +129,13 @@ test: image: python:3.11-slim-bookworm stage: test rules: - - if: $CI_COMMIT_BRANCH + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH + changes: + - app/**/* + - test/**/* variables: DATABASE: sqlite:///../app/db.sqlite parallel: From 4fb90a22e3ddcb3eaaccaa1324d70b3aa6a8ea9d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 13:10:12 +0100 Subject: [PATCH 51/84] make tests interruptible --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ef1a94..0ef24bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,6 +128,7 @@ build:pacman: test: image: python:3.11-slim-bookworm stage: test + interruptible: true rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG From 0696900d6729dd1d3d208a03379b0d5006f5987b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 13:30:30 +0100 Subject: [PATCH 52/84] fixes --- .PKGBUILD/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.PKGBUILD/PKGBUILD b/.PKGBUILD/PKGBUILD index f1ed955..85a35cc 100644 --- a/.PKGBUILD/PKGBUILD +++ b/.PKGBUILD/PKGBUILD @@ -12,7 +12,7 @@ depends=('python' 'python-jose' 'python-starlette' 'python-httpx' 'python-fastap provider=("$pkgname") install="$pkgname.install" backup=('etc/default/fastapi-dls') -source=('git+file:///tmp/builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git +source=("git+file://${CI_PROJECT_DIR}" # todo: support dynamic CI/CD paths "$pkgname.default" "$pkgname.service" "$pkgname.tmpfiles") From 213e768708affa8c8ee7d2679b8792d999ddd53f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Jan 2024 17:02:09 +0100 Subject: [PATCH 53/84] removed todo --- .PKGBUILD/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.PKGBUILD/PKGBUILD b/.PKGBUILD/PKGBUILD index 85a35cc..09f606b 100644 --- a/.PKGBUILD/PKGBUILD +++ b/.PKGBUILD/PKGBUILD @@ -12,7 +12,7 @@ depends=('python' 'python-jose' 'python-starlette' 'python-httpx' 'python-fastap provider=("$pkgname") install="$pkgname.install" backup=('etc/default/fastapi-dls') -source=("git+file://${CI_PROJECT_DIR}" # todo: support dynamic CI/CD paths +source=("git+file://${CI_PROJECT_DIR}" "$pkgname.default" "$pkgname.service" "$pkgname.tmpfiles") From 7c70d121be22de07891586ba0de7d51b8b727837 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 26 Feb 2024 20:53:33 +0100 Subject: [PATCH 54/84] requirements.txt updated --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 68afc4f..6eea61c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.109.0 -uvicorn[standard]==0.25.0 +fastapi==0.110.0 +uvicorn[standard]==0.27.1 python-jose==3.3.0 pycryptodome==3.20.0 python-dateutil==2.8.2 -sqlalchemy==2.0.25 +sqlalchemy==2.0.27 markdown==3.5.2 -python-dotenv==1.0.0 +python-dotenv==1.0.1 From ed59260a104c9c02e9544fdd6218a8eddcb561ce Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 26 Feb 2024 20:53:47 +0100 Subject: [PATCH 55/84] added "16.3" support --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5bd6af9..8f7ffea 100644 --- a/README.md +++ b/README.md @@ -428,6 +428,7 @@ Successfully tested with this package versions: | vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------------|--------------|----------------|---------------| +| `16.3` | `535.154.02` | `535.154.05` | `538.15` | January 2024 | | `16.2` | `535.129.03` | `535.129.03` | `537.70` | October 2023 | | `16.1` | `535.104.06` | `535.104.05` | `537.13` | August 2023 | | `16.0` | `535.54.06` | `535.54.03` | `536.22` | July 2023 | @@ -440,6 +441,11 @@ Successfully tested with this package versions: - https://docs.nvidia.com/grid/index.html +*To get the latest drivers, visit Nvidia or search in Discord-Channel `GPU Unlocking` (Server-ID: `829786927829745685`) on channel `licensing` `biggerthanshit` + + +https://archive.biggerthanshit.com/NVIDIA/ (nvidia / b1gg3rth4nsh1t) + ## Linux Download *client-token* and place it into `/etc/nvidia/ClientConfigToken`: From 7800bf73a878e0de749df3876211a326315476fc Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 27 Feb 2024 15:44:34 +0100 Subject: [PATCH 56/84] added "16.4" and "17.0" as supported --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8f7ffea..f3a6f73 100644 --- a/README.md +++ b/README.md @@ -428,6 +428,8 @@ Successfully tested with this package versions: | vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------------|--------------|----------------|---------------| +| `17.0` | `550.54.10` | `550.54.14` | `551.61` | February 2024 | +| `16.4` | `535.161.05` | `535.161.05` | `538.33` | February 2024 | | `16.3` | `535.154.02` | `535.154.05` | `538.15` | January 2024 | | `16.2` | `535.129.03` | `535.129.03` | `537.70` | October 2023 | | `16.1` | `535.104.06` | `535.104.05` | `537.13` | August 2023 | From 66d203e72aede8f635173a78ebde288b7163b07d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 4 Mar 2024 21:13:12 +0100 Subject: [PATCH 57/84] requirements.txt updated --- Dockerfile | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14d53b1..ca25001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apk update \ && apk add --no-cache --virtual build-deps gcc g++ python3-dev musl-dev pkgconfig \ && apk add --no-cache curl postgresql postgresql-dev mariadb-dev sqlite-dev \ && pip install --no-cache-dir --upgrade uvicorn \ - && pip install --no-cache-dir psycopg2==2.9.6 mysqlclient==2.2.0 pysqlite3==0.5.1 \ + && pip install --no-cache-dir psycopg2==2.9.9 mysqlclient==2.2.4 pysqlite3==0.5.2 \ && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del build-deps diff --git a/requirements.txt b/requirements.txt index 6eea61c..69e8fb4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ uvicorn[standard]==0.27.1 python-jose==3.3.0 pycryptodome==3.20.0 python-dateutil==2.8.2 -sqlalchemy==2.0.27 +sqlalchemy==2.0.28 markdown==3.5.2 python-dotenv==1.0.1 From a5d599a52c68e6a26d34de02be89c064f93fbd17 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 4 Mar 2024 21:31:56 +0100 Subject: [PATCH 58/84] typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3a6f73..c45188c 100644 --- a/README.md +++ b/README.md @@ -416,9 +416,9 @@ After first success you have to replace `--issue` with `--renew`. every 4.8 hours. If network connectivity is lost, the loss of connectivity is detected during license renewal and the client has 19.2 hours in which to re-establish connectivity before its license expires. -\*3 Always use `https`, since guest-drivers only support secure connections! +\*2 Always use `https`, since guest-drivers only support secure connections! -\*4 If you recreate instance keys you need to **recreate client-token for each guest**! +\*3 If you recreate your instance keys you need to **recreate client-token for each guest**! # Setup (Client) From dd69f60fd0df0eaa73d37fc71b82915e5b717809 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 6 Mar 2024 20:58:51 +0100 Subject: [PATCH 59/84] added link to releases & release notes --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c45188c..a10d929 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Only the clients need a connection to this service on configured port. *All other repositories are forks! (which is no bad - just for information and bug reports)* +[Releases & Release Notes](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/-/releases) + --- [[_TOC_]] From 8f498f496067985a416938b237b87de7d0ea6b69 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 8 Apr 2024 15:10:01 +0200 Subject: [PATCH 60/84] added 17.1 as supported --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a10d929..199cf54 100644 --- a/README.md +++ b/README.md @@ -430,6 +430,7 @@ Successfully tested with this package versions: | vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | |---------------|--------------------|--------------|----------------|---------------| +| `17.1` | `550.54.16` | `550.54.15` | `551.78` | March 2024 | | `17.0` | `550.54.10` | `550.54.14` | `551.61` | February 2024 | | `16.4` | `535.161.05` | `535.161.05` | `538.33` | February 2024 | | `16.3` | `535.154.02` | `535.154.05` | `538.15` | January 2024 | From e04723d128e9a25e0c9e96d12f477aab2c33ab3a Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 9 Apr 2024 08:01:01 +0200 Subject: [PATCH 61/84] removed biggerthanshit link --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 199cf54..43748b9 100644 --- a/README.md +++ b/README.md @@ -446,10 +446,7 @@ Successfully tested with this package versions: - https://docs.nvidia.com/grid/index.html -*To get the latest drivers, visit Nvidia or search in Discord-Channel `GPU Unlocking` (Server-ID: `829786927829745685`) on channel `licensing` `biggerthanshit` - - -https://archive.biggerthanshit.com/NVIDIA/ (nvidia / b1gg3rth4nsh1t) +*To get the latest drivers, visit Nvidia or search in Discord-Channel `GPU Unlocking` (Server-ID: `829786927829745685`) on channel `licensing` `biggerthanshit` ## Linux From 07273c3ebd47bb8512b952d52cfe402d2da269b2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 9 Apr 2024 08:01:20 +0200 Subject: [PATCH 62/84] update vGPU Version Matrix --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 43748b9..7e52b39 100644 --- a/README.md +++ b/README.md @@ -428,21 +428,23 @@ client has 19.2 hours in which to re-establish connectivity before its license e Successfully tested with this package versions: -| vGPU Suftware | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | -|---------------|--------------------|--------------|----------------|---------------| -| `17.1` | `550.54.16` | `550.54.15` | `551.78` | March 2024 | -| `17.0` | `550.54.10` | `550.54.14` | `551.61` | February 2024 | -| `16.4` | `535.161.05` | `535.161.05` | `538.33` | February 2024 | -| `16.3` | `535.154.02` | `535.154.05` | `538.15` | January 2024 | -| `16.2` | `535.129.03` | `535.129.03` | `537.70` | October 2023 | -| `16.1` | `535.104.06` | `535.104.05` | `537.13` | August 2023 | -| `16.0` | `535.54.06` | `535.54.03` | `536.22` | July 2023 | -| `15.3` | `525.125.03` | `525.125.06` | `529.11` | June 2023 | -| `15.2` | `525.105.14` | `525.105.17` | `528.89` | March 2023 | -| `15.1` | `525.85.07` | `525.85.05` | `528.24` | January 2023 | -| `15.0` | `525.60.12` | `525.60.13` | `527.41` | December 2022 | -| `14.4` | `510.108.03` | `510.108.03` | `514.08` | December 2022 | -| `14.3` | `510.108.03` | `510.108.03` | `513.91` | November 2022 | +| vGPU Suftware | Driver Branch | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | EOL Date | +|:-------------:|:-------------:|--------------------|--------------|----------------|--------------:|--------------:| +| `17.1` | R550 | `550.54.16` | `550.54.15` | `551.78` | March 2024 | February 2025 | +| `17.0` | R550 | `550.54.10` | `550.54.14` | `551.61` | February 2024 | | +| `16.5` | R535 | `535.161.05` | `535.161.08` | `538.46` | February 2024 | July 2026 | +| `16.4` | R535 | `535.161.05` | `535.161.07` | `538.33` | February 2024 | | +| `16.3` | R535 | `535.154.02` | `535.154.05` | `538.15` | January 2024 | | +| `16.2` | R535 | `535.129.03` | `535.129.03` | `537.70` | October 2023 | | +| `16.1` | R535 | `535.104.06` | `535.104.05` | `537.13` | August 2023 | | +| `16.0` | R535 | `535.54.06` | `535.54.03` | `536.22` | July 2023 | | +| `15.4` | R525 | `525.147.01` | `525.147.05` | `529.19` | June 2023 | October 2023 | +| `15.3` | R525 | `525.125.03` | `525.125.06` | `529.11` | June 2023 | | +| `15.2` | R525 | `525.105.14` | `525.105.17` | `528.89` | March 2023 | | +| `15.1` | R525 | `525.85.07` | `525.85.05` | `528.24` | January 2023 | | +| `15.0` | R525 | `525.60.12` | `525.60.13` | `527.41` | December 2022 | | +| `14.4` | R510 | `510.108.03` | `510.108.03` | `514.08` | December 2022 | February 2023 | +| `14.3` | R510 | `510.108.03` | `510.108.03` | `513.91` | November 2022 | | - https://docs.nvidia.com/grid/index.html From 254e4ee08c983e4bc3a854b66648d55566dbb595 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 9 Apr 2024 08:13:33 +0200 Subject: [PATCH 63/84] requirements.txt updated --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 69e8fb4..d084a8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.110.0 -uvicorn[standard]==0.27.1 +fastapi==0.110.1 +uvicorn[standard]==0.29.0 python-jose==3.3.0 pycryptodome==3.20.0 python-dateutil==2.8.2 -sqlalchemy==2.0.28 -markdown==3.5.2 +sqlalchemy==2.0.29 +markdown==3.6 python-dotenv==1.0.1 From 395884f6439c126c424f86eb3292f9fc66f425f0 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 10 Apr 2024 07:09:01 +0200 Subject: [PATCH 64/84] credits & further reading --- README.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7e52b39..1798142 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,19 @@ Only the clients need a connection to this service on configured port. **Official Links** -- https://git.collinwebdesigns.de/oscar.krause/fastapi-dls (Private Git) -- https://gitea.publichub.eu/oscar.krause/fastapi-dls (Public Git) -- https://hub.docker.com/r/collinwebdesigns/fastapi-dls (Docker-Hub `collinwebdesigns/fastapi-dls:latest`) +* https://git.collinwebdesigns.de/oscar.krause/fastapi-dls (Private Git) +* https://gitea.publichub.eu/oscar.krause/fastapi-dls (Public Git) +* https://hub.docker.com/r/collinwebdesigns/fastapi-dls (Docker-Hub `collinwebdesigns/fastapi-dls:latest`) *All other repositories are forks! (which is no bad - just for information and bug reports)* [Releases & Release Notes](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/-/releases) +**Further Reading** + +* [NVIDIA vGPU Guide](https://gitlab.com/polloloco/vgpu-proxmox) - This document serves as a guide to install NVIDIA vGPU host drivers on the latest Proxmox VE version +* [vgpu_unlock](https://github.com/DualCoder/vgpu_unlock) - Unlock vGPU functionality for consumer-grade Nvidia GPUs. +* [vGPU_Unlock Wiki](https://docs.google.com/document/d/1pzrWJ9h-zANCtyqRgS7Vzla0Y8Ea2-5z2HEi4X75d2Q) - Guide for `vgpu_unlock` --- [[_TOC_]] @@ -104,7 +109,7 @@ volumes: dls-db: ``` -## Debian/Ubuntu/macOS (manual method using `git clone` and python virtual environment) +## Debian / Ubuntu / macOS (manual method using `git clone` and python virtual environment) Tested on `Debian 11 (bullseye)`, `Debian 12 (bookworm)` and `macOS Ventura (13.6)`, Ubuntu may also work. **Please note that setup on macOS differs from Debian based systems.** @@ -311,7 +316,7 @@ EOF Now you have to run `systemctl daemon-reload`. After that you can start service with `systemctl start fastapi-dls.service` and enable autostart with `systemctl enable fastapi-dls.service`. -## Debian/Ubuntu (using `dpkg`) +## Debian / Ubuntu (using `dpkg` / `apt`) Packages are available here: @@ -583,7 +588,7 @@ Generate client token, (see [installation](#installation)). There are many other internal api endpoints for handling authentication and lease process.
-# Troubleshoot +# Troubleshoot / Debug **Please make sure that fastapi-dls and your guests are on the same timezone!** @@ -739,6 +744,11 @@ Thanks to vGPU community and all who uses this project and report bugs. Special thanks to -- @samicrusader who created build file for ArchLinux -- @cyrus who wrote the section for openSUSE -- @midi who wrote the section for unRAID +- @samicrusader who created build file for **ArchLinux** +- @cyrus who wrote the section for **openSUSE** +- @midi who wrote the section for **unRAID** +- @polloloco who wrote the *[NVIDIA vGPU Guide](https://gitlab.com/polloloco/vgpu-proxmox)* +- @DualCoder who creates the `vgpu_unlock` functionality [vgpu_unlock](https://github.com/DualCoder/vgpu_unlock) +- Krutav Shah who wrote the [vGPU_Unlock Wiki](https://docs.google.com/document/d/1pzrWJ9h-zANCtyqRgS7Vzla0Y8Ea2-5z2HEi4X75d2Q/) + +And thanks to all people who contributed to all these libraries! From 9eb91cbe1ad1536c9ff915d3b4666aa7c1164aab Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 18 Apr 2024 07:07:57 +0200 Subject: [PATCH 65/84] link to proxmox-installer.sh and credits --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1798142..bc1a670 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Only the clients need a connection to this service on configured port. * [NVIDIA vGPU Guide](https://gitlab.com/polloloco/vgpu-proxmox) - This document serves as a guide to install NVIDIA vGPU host drivers on the latest Proxmox VE version * [vgpu_unlock](https://github.com/DualCoder/vgpu_unlock) - Unlock vGPU functionality for consumer-grade Nvidia GPUs. * [vGPU_Unlock Wiki](https://docs.google.com/document/d/1pzrWJ9h-zANCtyqRgS7Vzla0Y8Ea2-5z2HEi4X75d2Q) - Guide for `vgpu_unlock` +* [Proxmox All-In-One Installer Script](https://wvthoog.nl/proxmox-vgpu-v3/) - Also known as `proxmox-installer.sh` + --- [[_TOC_]] @@ -750,5 +752,6 @@ Special thanks to - @polloloco who wrote the *[NVIDIA vGPU Guide](https://gitlab.com/polloloco/vgpu-proxmox)* - @DualCoder who creates the `vgpu_unlock` functionality [vgpu_unlock](https://github.com/DualCoder/vgpu_unlock) - Krutav Shah who wrote the [vGPU_Unlock Wiki](https://docs.google.com/document/d/1pzrWJ9h-zANCtyqRgS7Vzla0Y8Ea2-5z2HEi4X75d2Q/) +- Wim van 't Hoog for the [Proxmox All-In-One Installer Script](https://wvthoog.nl/proxmox-vgpu-v3/) And thanks to all people who contributed to all these libraries! From be6797efc7af5d696a8e365211f5d28f9414c22b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 23 Apr 2024 07:43:39 +0200 Subject: [PATCH 66/84] requirements.txt updated --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d084a8c..ed8dd48 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -fastapi==0.110.1 +fastapi==0.110.2 uvicorn[standard]==0.29.0 python-jose==3.3.0 pycryptodome==3.20.0 From 11f14565387404597c1e7543d2a2688e4cc3e46f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 10 May 2024 07:56:13 +0200 Subject: [PATCH 67/84] test image matrix --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ef24bf..5ca622b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ build:pacman: - "*.pkg.tar.zst" test: - image: python:3.11-slim-bookworm + image: $IMAGE stage: test interruptible: true rules: @@ -141,6 +141,7 @@ test: DATABASE: sqlite:///../app/db.sqlite parallel: matrix: + - IMAGE: ['python:3.11-slim-bookworm'] - REQUIREMENTS: - requirements.txt - .DEBIAN/requirements-bookworm-12.txt From 4ebb4d790e7a9f29a319d63673b4b26fe4aab0e2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 10 May 2024 08:22:47 +0200 Subject: [PATCH 68/84] added ubuntu-24.04 "requirements-ubuntu-24.04.txt" --- .DEBIAN/requirements-ubuntu-24.04.txt | 10 ++++++++++ .gitlab-ci.yml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .DEBIAN/requirements-ubuntu-24.04.txt diff --git a/.DEBIAN/requirements-ubuntu-24.04.txt b/.DEBIAN/requirements-ubuntu-24.04.txt new file mode 100644 index 0000000..7cb653b --- /dev/null +++ b/.DEBIAN/requirements-ubuntu-24.04.txt @@ -0,0 +1,10 @@ +# https://packages.ubuntu.com +fastapi==0.101.0 +uvicorn[standard]==0.27.1 +python-jose[pycryptodome]==3.3.0 +pycryptodome==3.20.0 +python-dateutil==2.8.2 +sqlalchemy==1.4.50 +markdown==3.5.2 +python-dotenv==1.0.1 +jinja2==3.1.2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ca622b..f7ba457 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ build:pacman: - "*.pkg.tar.zst" test: - image: $IMAGE + image: python:3.11-slim-bookworm stage: test interruptible: true rules: @@ -141,11 +141,11 @@ test: DATABASE: sqlite:///../app/db.sqlite parallel: matrix: - - IMAGE: ['python:3.11-slim-bookworm'] - REQUIREMENTS: - requirements.txt - .DEBIAN/requirements-bookworm-12.txt - .DEBIAN/requirements-ubuntu-23.10.txt + - .DEBIAN/requirements-ubuntu-24.04.txt before_script: - apt-get update && apt-get install -y python3-dev gcc - pip install -r $REQUIREMENTS From 78c1978dd50d7737aee0a3f2b8886d05e82fa8a2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 10 May 2024 09:15:46 +0200 Subject: [PATCH 69/84] added test matrix for python3.12 --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7ba457..5543e53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ build:pacman: - "*.pkg.tar.zst" test: - image: python:3.11-slim-bookworm + image: $IMAGE stage: test interruptible: true rules: @@ -141,7 +141,8 @@ test: DATABASE: sqlite:///../app/db.sqlite parallel: matrix: - - REQUIREMENTS: + - IMAGE: [ 'python:3.11-slim-bookworm', 'python:3.12-slim-bullseye' ] + REQUIREMENTS: - requirements.txt - .DEBIAN/requirements-bookworm-12.txt - .DEBIAN/requirements-ubuntu-23.10.txt @@ -206,7 +207,7 @@ test:debian: test:ubuntu: extends: .test:linux - image: ubuntu:23.10 + image: ubuntu:24.04 test:archlinux: image: archlinux:base From e51d6bd391b770d962e3f6dcdd139f5bd02fd075 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 10 May 2024 09:16:20 +0200 Subject: [PATCH 70/84] added Ubuntu 24.04 as supported --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bc1a670..95f2ee0 100644 --- a/README.md +++ b/README.md @@ -330,6 +330,7 @@ Successful tested with: - Ubuntu 22.10 (Kinetic Kudu) (EOL: July 20, 2023) - Ubuntu 23.04 (Lunar Lobster) (EOL: January 2024) - Ubuntu 23.10 (Mantic Minotaur) (EOL: July 2024) +- Ubuntu 24.04 (Noble Numbat) (EOL: April 2036) Not working with: From ad3b622c23c885d9f8609b4e72cd299f3cfb4f8a Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 10 May 2024 10:09:28 +0200 Subject: [PATCH 71/84] requirements.txt updated --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ed8dd48..097c30b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -fastapi==0.110.2 +fastapi==0.111.0 uvicorn[standard]==0.29.0 python-jose==3.3.0 pycryptodome==3.20.0 python-dateutil==2.8.2 -sqlalchemy==2.0.29 +sqlalchemy==2.0.30 markdown==3.6 python-dotenv==1.0.1 From ca53a4e08459ae8c905ad4cc339831045555bf0d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 7 Jun 2024 08:42:37 +0200 Subject: [PATCH 72/84] updated supported vGPU releases --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95f2ee0..cba5481 100644 --- a/README.md +++ b/README.md @@ -438,9 +438,11 @@ Successfully tested with this package versions: | vGPU Suftware | Driver Branch | Linux vGPU Manager | Linux Driver | Windows Driver | Release Date | EOL Date | |:-------------:|:-------------:|--------------------|--------------|----------------|--------------:|--------------:| -| `17.1` | R550 | `550.54.16` | `550.54.15` | `551.78` | March 2024 | February 2025 | +| `17.2` | R550 | `550.90.05` | `550.90.07` | `552.55` | June 2024 | February 2025 | +| `17.1` | R550 | `550.54.16` | `550.54.15` | `551.78` | March 2024 | | | `17.0` | R550 | `550.54.10` | `550.54.14` | `551.61` | February 2024 | | -| `16.5` | R535 | `535.161.05` | `535.161.08` | `538.46` | February 2024 | July 2026 | +| `16.6` | R535 | `535.183.04` | `535.183.01` | `538.67` | June 2024 | July 2026 | +| `16.5` | R535 | `535.161.05` | `535.161.08` | `538.46` | February 2024 | | | `16.4` | R535 | `535.161.05` | `535.161.07` | `538.33` | February 2024 | | | `16.3` | R535 | `535.154.02` | `535.154.05` | `538.15` | January 2024 | | | `16.2` | R535 | `535.129.03` | `535.129.03` | `537.70` | October 2023 | | From 847d3589c5acd00924ca42ba17378b73846b306c Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 7 Jun 2024 08:42:41 +0200 Subject: [PATCH 73/84] typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cba5481..cd07e66 100644 --- a/README.md +++ b/README.md @@ -326,7 +326,7 @@ Packages are available here: Successful tested with: -- Debian 12 (Bookworm) +- Debian 12 (Bookworm) (EOL: tba.) - Ubuntu 22.10 (Kinetic Kudu) (EOL: July 20, 2023) - Ubuntu 23.04 (Lunar Lobster) (EOL: January 2024) - Ubuntu 23.10 (Mantic Minotaur) (EOL: July 2024) From 1d0631417d7e060059627a3a698bb1ad8fa0d278 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 12 Jun 2024 19:44:37 +0200 Subject: [PATCH 74/84] added link to gpu support matrix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cd07e66..ba9aa63 100644 --- a/README.md +++ b/README.md @@ -457,6 +457,7 @@ Successfully tested with this package versions: | `14.3` | R510 | `510.108.03` | `510.108.03` | `513.91` | November 2022 | | - https://docs.nvidia.com/grid/index.html +- https://docs.nvidia.com/grid/gpus-supported-by-vgpu.html *To get the latest drivers, visit Nvidia or search in Discord-Channel `GPU Unlocking` (Server-ID: `829786927829745685`) on channel `licensing` `biggerthanshit` From c45aa1a2a80c32dc7feb11c62bdefc50ea2fe13c Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 12 Jun 2024 21:27:56 +0200 Subject: [PATCH 75/84] fixed [[__TOC__]] to [TOC] to support "markdown" package --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba9aa63..3834be3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Only the clients need a connection to this service on configured port. --- -[[_TOC_]] +[TOC] # Setup (Service) From 6473655e57d31f6d30aaba82c7af24beecf2c9c2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 19:24:46 +0200 Subject: [PATCH 76/84] import fixes --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 45b53aa..bbeb3b8 100644 --- a/app/main.py +++ b/app/main.py @@ -108,7 +108,7 @@ async def _config(): @app.get('/-/readme', summary='* Readme') async def _readme(): from markdown import markdown - content = load_file('../README.md').decode('utf-8') + content = load_file(join(dirname(__file__), '../README.md')).decode('utf-8') return HTMLr(markdown(text=content, extensions=['tables', 'fenced_code', 'md_in_html', 'nl2br', 'toc'])) From eff6aae25dd5d3c929ca862012fe92259bef1bb7 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 19:53:57 +0200 Subject: [PATCH 77/84] code styling --- app/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/orm.py b/app/orm.py index 0b19e92..dacf2b0 100644 --- a/app/orm.py +++ b/app/orm.py @@ -1,6 +1,6 @@ from datetime import datetime, timedelta -from dateutil.relativedelta import relativedelta +from dateutil.relativedelta import relativedelta from sqlalchemy import Column, VARCHAR, CHAR, ForeignKey, DATETIME, update, and_, inspect, text from sqlalchemy.engine import Engine from sqlalchemy.orm import sessionmaker, declarative_base From 21f19be8ab2b8d555d161801d5e0ddb93e09691c Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 20:16:51 +0200 Subject: [PATCH 78/84] code styling & improved logging --- app/main.py | 4 +++- app/util.py | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index bbeb3b8..adafd34 100644 --- a/app/main.py +++ b/app/main.py @@ -60,9 +60,11 @@ app.add_middleware( allow_headers=['*'], ) +LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO logging.basicConfig() logger = logging.getLogger(__name__) -logger.setLevel(logging.DEBUG if DEBUG else logging.INFO) +logger.setLevel(LOG_LEVEL) +logging.getLogger('util').setLevel(LOG_LEVEL) def __get_token(request: Request) -> dict: diff --git a/app/util.py b/app/util.py index ca3eec6..530e5c0 100644 --- a/app/util.py +++ b/app/util.py @@ -1,10 +1,17 @@ -def load_file(filename) -> bytes: +import logging + +logging.basicConfig() + + +def load_file(filename: str) -> bytes: + log = logging.getLogger(f'{__name__}') + log.debug(f'Loading contents of file "{filename}') with open(filename, 'rb') as file: content = file.read() return content -def load_key(filename) -> "RsaKey": +def load_key(filename: str) -> "RsaKey": try: # Crypto | Cryptodome on Debian from Crypto.PublicKey import RSA @@ -13,6 +20,8 @@ def load_key(filename) -> "RsaKey": from Cryptodome.PublicKey import RSA from Cryptodome.PublicKey.RSA import RsaKey + log = logging.getLogger(__name__) + log.debug(f'Importing RSA-Key from "{filename}"') return RSA.import_key(extern_key=load_file(filename), passphrase=None) @@ -24,5 +33,6 @@ def generate_key() -> "RsaKey": except ModuleNotFoundError: from Cryptodome.PublicKey import RSA from Cryptodome.PublicKey.RSA import RsaKey - + log = logging.getLogger(__name__) + log.debug(f'Generating RSA-Key') return RSA.generate(bits=2048) From 5438317fb7ac9a4237c00f6dc8250ba9f014e379 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 20:18:18 +0200 Subject: [PATCH 79/84] rearranged imports --- app/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/main.py b/app/main.py index adafd34..6be05df 100644 --- a/app/main.py +++ b/app/main.py @@ -1,26 +1,26 @@ import logging from base64 import b64encode as b64enc +from calendar import timegm +from datetime import datetime, timedelta from hashlib import sha256 -from uuid import uuid4 -from os.path import join, dirname +from json import loads as json_loads from os import getenv as env +from os.path import join, dirname +from uuid import uuid4 +from dateutil.relativedelta import relativedelta from dotenv import load_dotenv from fastapi import FastAPI from fastapi.requests import Request -from json import loads as json_loads -from datetime import datetime, timedelta -from dateutil.relativedelta import relativedelta -from calendar import timegm from jose import jws, jwk, jwt, JWTError from jose.constants import ALGORITHMS -from starlette.middleware.cors import CORSMiddleware -from starlette.responses import StreamingResponse, JSONResponse as JSONr, HTMLResponse as HTMLr, Response, RedirectResponse from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker +from starlette.middleware.cors import CORSMiddleware +from starlette.responses import StreamingResponse, JSONResponse as JSONr, HTMLResponse as HTMLr, Response, RedirectResponse -from util import load_key, load_file from orm import Origin, Lease, init as db_init, migrate +from util import load_key, load_file load_dotenv('../version.env') From 0d9e814d0d2b766b6584f7f3a34c3c1d6889b71f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 20:18:33 +0200 Subject: [PATCH 80/84] show if debug is enabled on app startup --- app/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/main.py b/app/main.py index 6be05df..ab87bde 100644 --- a/app/main.py +++ b/app/main.py @@ -553,6 +553,8 @@ async def app_on_startup(): Your client-token file (.tok) is valid for {str(CLIENT_TOKEN_EXPIRE_DELTA)}. ''') + logger.info(f'Debug is {"enabled" if DEBUG else "disabled"}.') + if __name__ == '__main__': import uvicorn From 8c5850beda441b4f1d7d2f8f718514657ef3534d Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 20:34:27 +0200 Subject: [PATCH 81/84] migrated from deprecated "startup" to "lifespan" hook (fastapi) --- app/main.py | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/app/main.py b/app/main.py index ab87bde..886cfe1 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,7 @@ import logging from base64 import b64encode as b64enc from calendar import timegm +from contextlib import asynccontextmanager from datetime import datetime, timedelta from hashlib import sha256 from json import loads as json_loads @@ -51,6 +52,28 @@ CORS_ORIGINS = str(env('CORS_ORIGINS', '')).split(',') if (env('CORS_ORIGINS')) jwt_encode_key = jwk.construct(INSTANCE_KEY_RSA.export_key().decode('utf-8'), algorithm=ALGORITHMS.RS256) jwt_decode_key = jwk.construct(INSTANCE_KEY_PUB.export_key().decode('utf-8'), algorithm=ALGORITHMS.RS256) +# FastAPI +@asynccontextmanager +async def lifespan(_: FastAPI): + # on startup + logger.info(f''' + + Using timezone: {str(TZ)}. Make sure this is correct and match your clients! + + Your clients renew their license every {str(Lease.calculate_renewal(LEASE_RENEWAL_PERIOD, LEASE_RENEWAL_DELTA))}. + If the renewal fails, the license is {str(LEASE_RENEWAL_DELTA)} valid. + + Your client-token file (.tok) is valid for {str(CLIENT_TOKEN_EXPIRE_DELTA)}. + ''') + + logger.info(f'Debug is {"enabled" if DEBUG else "disabled"}.') + + yield + + # on shutdown + logger.info(f'Shutting down ...') + + app.debug = DEBUG app.add_middleware( CORSMiddleware, @@ -542,20 +565,6 @@ async def leasing_v1_lessor_shutdown(request: Request): return JSONr(response) -@app.on_event('startup') -async def app_on_startup(): - logger.info(f''' - Using timezone: {str(TZ)}. Make sure this is correct and match your clients! - - Your clients renew their license every {str(Lease.calculate_renewal(LEASE_RENEWAL_PERIOD, LEASE_RENEWAL_DELTA))}. - If the renewal fails, the license is {str(LEASE_RENEWAL_DELTA)} valid. - - Your client-token file (.tok) is valid for {str(CLIENT_TOKEN_EXPIRE_DELTA)}. - ''') - - logger.info(f'Debug is {"enabled" if DEBUG else "disabled"}.') - - if __name__ == '__main__': import uvicorn From c9ac915055af21d4b7586b05e8bd34e10defab34 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 13 Jun 2024 20:34:45 +0200 Subject: [PATCH 82/84] code styling & comments --- app/main.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index 886cfe1..c79c7b7 100644 --- a/app/main.py +++ b/app/main.py @@ -23,18 +23,20 @@ from starlette.responses import StreamingResponse, JSONResponse as JSONr, HTMLRe from orm import Origin, Lease, init as db_init, migrate from util import load_key, load_file +# Load variables load_dotenv('../version.env') +# Get current timezone TZ = datetime.now().astimezone().tzinfo +# Load basic variables VERSION, COMMIT, DEBUG = env('VERSION', 'unknown'), env('COMMIT', 'unknown'), bool(env('DEBUG', False)) -config = dict(openapi_url=None, docs_url=None, redoc_url=None) # dict(openapi_url='/-/openapi.json', docs_url='/-/docs', redoc_url='/-/redoc') -app = FastAPI(title='FastAPI-DLS', description='Minimal Delegated License Service (DLS).', version=VERSION, **config) +# Database connection db = create_engine(str(env('DATABASE', 'sqlite:///db.sqlite'))) db_init(db), migrate(db) -# everything prefixed with "INSTANCE_*" is used as "SERVICE_INSTANCE_*" or "SI_*" in official dls service +# Load DLS variables (all prefixed with "INSTANCE_*" is used as "SERVICE_INSTANCE_*" or "SI_*" in official dls service) DLS_URL = str(env('DLS_URL', 'localhost')) DLS_PORT = int(env('DLS_PORT', '443')) SITE_KEY_XID = str(env('SITE_KEY_XID', '00000000-0000-0000-0000-000000000000')) @@ -52,6 +54,7 @@ CORS_ORIGINS = str(env('CORS_ORIGINS', '')).split(',') if (env('CORS_ORIGINS')) jwt_encode_key = jwk.construct(INSTANCE_KEY_RSA.export_key().decode('utf-8'), algorithm=ALGORITHMS.RS256) jwt_decode_key = jwk.construct(INSTANCE_KEY_PUB.export_key().decode('utf-8'), algorithm=ALGORITHMS.RS256) + # FastAPI @asynccontextmanager async def lifespan(_: FastAPI): @@ -74,6 +77,9 @@ async def lifespan(_: FastAPI): logger.info(f'Shutting down ...') +config = dict(openapi_url=None, docs_url=None, redoc_url=None) # dict(openapi_url='/-/openapi.json', docs_url='/-/docs', redoc_url='/-/redoc') +app = FastAPI(title='FastAPI-DLS', description='Minimal Delegated License Service (DLS).', version=VERSION, lifespan=lifespan, **config) + app.debug = DEBUG app.add_middleware( CORSMiddleware, @@ -83,6 +89,7 @@ app.add_middleware( allow_headers=['*'], ) +# Logging LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO logging.basicConfig() logger = logging.getLogger(__name__) @@ -90,12 +97,15 @@ logger.setLevel(LOG_LEVEL) logging.getLogger('util').setLevel(LOG_LEVEL) +# Helper def __get_token(request: Request) -> dict: authorization_header = request.headers.get('authorization') token = authorization_header.split(' ')[1] return jwt.decode(token=token, key=jwt_decode_key, algorithms=ALGORITHMS.RS256, options={'verify_aud': False}) +# Endpoints + @app.get('/', summary='Index') async def index(): return RedirectResponse('/-/readme') From 35fc5ea6b0bc266def42e0fc6fb952ae0d81ecbd Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 21 Jun 2024 18:59:23 +0200 Subject: [PATCH 83/84] set log format --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index c79c7b7..81c1c37 100644 --- a/app/main.py +++ b/app/main.py @@ -91,7 +91,7 @@ app.add_middleware( # Logging LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO -logging.basicConfig() +logging.basicConfig(format='[{levelname:^7}] [{module:^15}] {message}', style='{') logger = logging.getLogger(__name__) logger.setLevel(LOG_LEVEL) logging.getLogger('util').setLevel(LOG_LEVEL) From c79455b84d200f9515e976ac8cc385323a8bbb30 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Fri, 21 Jun 2024 19:01:33 +0200 Subject: [PATCH 84/84] added way to include driver version in api use `create_driver_matrix_json.py` to generate file in `static/driver_matrix.json`. Logging currently is disabled to not confuse users when file is missing. This is optional! --- app/main.py | 1 + app/orm.py | 5 ++ app/util.py | 44 ++++++++++ test/create_driver_matrix_json.py | 137 ++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 test/create_driver_matrix_json.py diff --git a/app/main.py b/app/main.py index 81c1c37..60a66b2 100644 --- a/app/main.py +++ b/app/main.py @@ -95,6 +95,7 @@ logging.basicConfig(format='[{levelname:^7}] [{module:^15}] {message}', style='{ logger = logging.getLogger(__name__) logger.setLevel(LOG_LEVEL) logging.getLogger('util').setLevel(LOG_LEVEL) +logging.getLogger('NV').setLevel(LOG_LEVEL) # Helper diff --git a/app/orm.py b/app/orm.py index dacf2b0..73828fd 100644 --- a/app/orm.py +++ b/app/orm.py @@ -5,6 +5,8 @@ from sqlalchemy import Column, VARCHAR, CHAR, ForeignKey, DATETIME, update, and_ from sqlalchemy.engine import Engine from sqlalchemy.orm import sessionmaker, declarative_base +from util import NV + Base = declarative_base() @@ -23,6 +25,8 @@ class Origin(Base): return f'Origin(origin_ref={self.origin_ref}, hostname={self.hostname})' def serialize(self) -> dict: + _ = NV().find(self.guest_driver_version) + return { 'origin_ref': self.origin_ref, # 'service_instance_xid': self.service_instance_xid, @@ -30,6 +34,7 @@ class Origin(Base): 'guest_driver_version': self.guest_driver_version, 'os_platform': self.os_platform, 'os_version': self.os_version, + '$driver': _ if _ is not None else None, } @staticmethod diff --git a/app/util.py b/app/util.py index 530e5c0..b5b1ff1 100644 --- a/app/util.py +++ b/app/util.py @@ -36,3 +36,47 @@ def generate_key() -> "RsaKey": log = logging.getLogger(__name__) log.debug(f'Generating RSA-Key') return RSA.generate(bits=2048) + + +class NV: + __DRIVER_MATRIX_FILENAME = 'static/driver_matrix.json' + __DRIVER_MATRIX: None | dict = None # https://docs.nvidia.com/grid/ => "Driver Versions" + + def __init__(self): + self.log = logging.getLogger(self.__class__.__name__) + + if NV.__DRIVER_MATRIX is None: + from json import load as json_load + try: + file = open(NV.__DRIVER_MATRIX_FILENAME) + NV.__DRIVER_MATRIX = json_load(file) + file.close() + self.log.debug(f'Successfully loaded "{NV.__DRIVER_MATRIX_FILENAME}".') + except Exception as e: + NV.__DRIVER_MATRIX = {} # init empty dict to not try open file everytime, just when restarting app + # self.log.warning(f'Failed to load "{NV.__DRIVER_MATRIX_FILENAME}": {e}') + + @staticmethod + def find(version: str) -> dict | None: + if NV.__DRIVER_MATRIX is None: + return None + for idx, (key, branch) in enumerate(NV.__DRIVER_MATRIX.items()): + for release in branch.get('$releases'): + linux_driver = release.get('Linux Driver') + windows_driver = release.get('Windows Driver') + if version == linux_driver or version == windows_driver: + tmp = branch.copy() + tmp.pop('$releases') + + is_latest = release.get('vGPU Software') == branch.get('Latest Release in Branch') + + return { + 'software_branch': branch.get('vGPU Software Branch'), + 'branch_version': release.get('vGPU Software'), + 'driver_branch': branch.get('Driver Branch'), + 'branch_status': branch.get('vGPU Branch Status'), + 'release_date': release.get('Release Date'), + 'eol': branch.get('EOL Date') if is_latest else None, + 'is_latest': is_latest, + } + return None diff --git a/test/create_driver_matrix_json.py b/test/create_driver_matrix_json.py new file mode 100644 index 0000000..1f31884 --- /dev/null +++ b/test/create_driver_matrix_json.py @@ -0,0 +1,137 @@ +import logging + +logging.basicConfig() +logger = logging.getLogger(__name__) +logger.setLevel(logging.INFO) + +URL = 'https://docs.nvidia.com/grid/' + +BRANCH_STATUS_KEY, SOFTWARE_BRANCH_KEY, = 'vGPU Branch Status', 'vGPU Software Branch' +VGPU_KEY, GRID_KEY, DRIVER_BRANCH_KEY = 'vGPU Software', 'vGPU Software', 'Driver Branch' +LINUX_VGPU_MANAGER_KEY, LINUX_DRIVER_KEY = 'Linux vGPU Manager', 'Linux Driver' +WINDOWS_VGPU_MANAGER_KEY, WINDOWS_DRIVER_KEY = 'Windows vGPU Manager', 'Windows Driver' +ALT_VGPU_MANAGER_KEY = 'vGPU Manager' +RELEASE_DATE_KEY, LATEST_KEY, EOL_KEY = 'Release Date', 'Latest Release in Branch', 'EOL Date' +JSON_RELEASES_KEY = '$releases' + + +def __driver_versions(html: 'BeautifulSoup'): + def __strip(_: str) -> str: + # removes content after linebreak (e.g. "Hello\n World" to "Hello") + _ = _.strip() + tmp = _.split('\n') + if len(tmp) > 0: + return tmp[0] + return _ + + # find wrapper for "DriverVersions" and find tables + data = html.find('div', {'id': 'DriverVersions'}) + tables = data.findAll('table') + for table in tables: + # parse software-branch (e.g. "vGPU software 17 Releases" and remove " Releases" for "matrix_key") + software_branch = table.parent.find_previous_sibling('button', {'class': 'accordion'}).text.strip() + software_branch = software_branch.replace(' Releases', '') + matrix_key = software_branch.lower() + + # driver version info from table-heads (ths) and table-rows (trs) + ths, trs = table.find_all('th'), table.find_all('tr') + headers, releases = [header.text.strip() for header in ths], [] + for trs in trs: + tds = trs.find_all('td') + if len(tds) == 0: # skip empty + continue + # create dict with table-heads as key and cell content as value + x = {headers[i]: __strip(cell.text) for i, cell in enumerate(tds)} + releases.append(x) + + # add to matrix + MATRIX.update({matrix_key: {JSON_RELEASES_KEY: releases}}) + + +def __release_branches(html: 'BeautifulSoup'): + # find wrapper for "AllReleaseBranches" and find table + data = html.find('div', {'id': 'AllReleaseBranches'}) + table = data.find('table') + + # branch releases info from table-heads (ths) and table-rows (trs) + ths, trs = table.find_all('th'), table.find_all('tr') + headers = [header.text.strip() for header in ths] + for trs in trs: + tds = trs.find_all('td') + if len(tds) == 0: # skip empty + continue + # create dict with table-heads as key and cell content as value + x = {headers[i]: cell.text.strip() for i, cell in enumerate(tds)} + + # get matrix_key + software_branch = x.get(SOFTWARE_BRANCH_KEY) + matrix_key = software_branch.lower() + + # add to matrix + MATRIX.update({matrix_key: MATRIX.get(matrix_key) | x}) + + +def __debug(): + # print table head + s = f'{SOFTWARE_BRANCH_KEY:^21} | {BRANCH_STATUS_KEY:^21} | {VGPU_KEY:^13} | {LINUX_VGPU_MANAGER_KEY:^21} | {LINUX_DRIVER_KEY:^21} | {WINDOWS_VGPU_MANAGER_KEY:^21} | {WINDOWS_DRIVER_KEY:^21} | {RELEASE_DATE_KEY:>21} | {EOL_KEY:>21}' + print(s) + + # iterate over dict & format some variables to not overload table + for idx, (key, branch) in enumerate(MATRIX.items()): + branch_status = branch.get(BRANCH_STATUS_KEY) + branch_status = branch_status.replace('Branch ', '') + branch_status = branch_status.replace('Long-Term Support', 'LTS') + branch_status = branch_status.replace('Production', 'Prod.') + + software_branch = branch.get(SOFTWARE_BRANCH_KEY).replace('NVIDIA ', '') + for release in branch.get(JSON_RELEASES_KEY): + version = release.get(VGPU_KEY, release.get(GRID_KEY, '')) + linux_manager = release.get(LINUX_VGPU_MANAGER_KEY, release.get(ALT_VGPU_MANAGER_KEY, '')) + linux_driver = release.get(LINUX_DRIVER_KEY) + windows_manager = release.get(WINDOWS_VGPU_MANAGER_KEY, release.get(ALT_VGPU_MANAGER_KEY, '')) + windows_driver = release.get(WINDOWS_DRIVER_KEY) + release_date = release.get(RELEASE_DATE_KEY) + is_latest = release.get(VGPU_KEY) == branch.get(LATEST_KEY) + + version = f'{version} *' if is_latest else version + eol = branch.get(EOL_KEY) if is_latest else '' + s = f'{software_branch:^21} | {branch_status:^21} | {version:<13} | {linux_manager:<21} | {linux_driver:<21} | {windows_manager:<21} | {windows_driver:<21} | {release_date:>21} | {eol:>21}' + print(s) + + +def __dump(filename: str): + import json + + file = open(filename, 'w') + json.dump(MATRIX, file) + file.close() + + +if __name__ == '__main__': + MATRIX = {} + + try: + import httpx + from bs4 import BeautifulSoup + except Exception as e: + logger.error(f'Failed to import module: {e}') + logger.info('Run "pip install beautifulsoup4 httpx"') + exit(1) + + r = httpx.get(URL) + if r.status_code != 200: + logger.error(f'Error loading "{URL}" with status code {r.status_code}.') + exit(2) + + # parse html + soup = BeautifulSoup(r.text, features='html.parser') + + # build matrix + __driver_versions(soup) + __release_branches(soup) + + # debug output + __debug() + + # dump data to file + __dump('../app/static/driver_matrix.json')