Minimal Delegated License Service (DLS). This is a mirrored repo from https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.
Go to file
2022-12-20 14:45:44 +01:00
app helper.py moved to main.py 2022-12-20 14:45:44 +01:00
doc Reverse Engineering Notes.md - fixes 2022-12-20 05:39:17 +01:00
.codeclimate.yml .codeclimate, .editorconfig, .gitignore 2022-12-16 13:50:34 +01:00
.editorconfig .codeclimate, .editorconfig, .gitignore 2022-12-16 13:50:34 +01:00
.gitignore .gitignore 2022-12-19 13:20:33 +01:00
.gitlab-ci.yml .gitlab-ci.yml - fixed deploy stage 2022-12-20 09:08:45 +01:00
Dockerfile Dockerfile - temporary added uvicorn ssl support (in future releases uvicorn listens to http and tls termination should be done by a proxy like traefik) 2022-12-19 14:33:23 +01:00
README.md README.md 2022-12-20 09:00:21 +01:00
requirements.txt requirements.txt - added "python-dateutil" 2022-12-19 12:59:40 +01:00
ToDo.md README.md, ToDo.md and added some docs 2022-12-16 13:51:00 +01:00

FastAPI-DLS

Minimal Delegated License Service (DLS).

Setup (Docker)

Run this on the Docker-Host

WORKING_DIR=/opt/docker/fastapi-dls/cert
mkdir -p $WORKING_DIR
cd $WORKING_DIR
openssl genrsa -out $WORKING_DIR/instance.private.pem 2048 
openssl rsa -in $WORKING_DIR/instance.private.pem -outform PEM -pubout -out $WORKING_DIR/instance.public.pem
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout  $WORKING_DIR/webserver.key -out $WORKING_DIR/webserver.crt
docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/app/cert collinwebdesigns/fastapi-dls:latest

Installation

The token file has to be copied! It's not enough to C&P file contents, because there can be special characters.

Linux

curl --insecure -X GET https://<dls-hostname-or-ip>/client-token -o /etc/nvidia/ClientConfigToken/client_configuration_token.tok
service nvidia-gridd restart
nvidia-smi -q | grep "License"

Windows

Download file and place it into C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken. Now restart NvContainerLocalSystem service.

Troubleshoot

Linux

Logs are available with journalctl -u nvidia-gridd -f.

Windows

Logs are available in C:\Users\Public\Documents\Nvidia\LoggingLog.NVDisplay.Container.exe.log.

Known Issues

Linux

Currently, there are no known issues.

Windows

On Windows there is currently a problem returning the license. As you can see the license is installed successfully after a few minutes. About the time of the first lease period the driver gets a Mismatch between client and server with respect to licenses held.

Log
Tue Dec 20 05:55:52 2022:<2>:NLS initialized
Tue Dec 20 05:55:57 2022:<2>:Mismatch between client and server with respect to licenses held. Returning the licenses
Tue Dec 20 05:55:58 2022:<2>:License returned successfully. (Info: 192.168.178.33)
Tue Dec 20 05:56:20 2022:<2>:Mismatch between client and server with respect to licenses held. Returning the licenses
Tue Dec 20 05:56:21 2022:<2>:License returned successfully. (Info: 192.168.178.33)
Tue Dec 20 05:56:46 2022:<2>:Mismatch between client and server with respect to licenses held. Returning the licenses
Tue Dec 20 05:56:47 2022:<2>:License returned successfully. (Info: 192.168.178.33)
Tue Dec 20 05:56:54 2022:<1>:License renewed successfully. (Info: 192.168.178.33, NVIDIA RTX Virtual Workstation; Expiry: 2022-12-20 5:11:54 GMT)
Tue Dec 20 05:57:17 2022:<2>:Mismatch between client and server with respect to licenses held. Returning the licenses
Tue Dec 20 05:57:18 2022:<2>:License returned successfully. (Info: 192.168.178.33)
Tue Dec 20 05:59:20 2022:<1>:License renewed successfully. (Info: 192.168.178.33, NVIDIA RTX Virtual Workstation; Expiry: 2022-12-20 5:14:20 GMT)
Tue Dec 20 06:01:45 2022:<1>:License renewed successfully. (Info: 192.168.178.33, NVIDIA RTX Virtual Workstation; Expiry: 2022-12-20 5:16:45 GMT)
Tue Dec 20 06:04:10 2022:<1>:License renewed successfully. (Info: 192.168.178.33, NVIDIA RTX Virtual Workstation; Expiry: 2022-12-20 5:19:10 GMT)