Compare commits

..

No commits in common. "73ffae76b666fbd7f11a211d5be9dd8c0cc11678" and "3d83e533da831e787720c1e58b4e58124325d578" have entirely different histories.

6 changed files with 10 additions and 32 deletions

View File

@ -6,12 +6,10 @@ CONFIG_DIR=/etc/fastapi-dls
echo "> Create config directory ..." echo "> Create config directory ..."
mkdir -p $CONFIG_DIR mkdir -p $CONFIG_DIR
# normally we would define services in `conffiles` and as separate file, but we like to keep thinks simple.
echo "> Install service ..." echo "> Install service ..."
cat <<EOF >/etc/systemd/system/fastapi-dls.service cat <<EOF >/etc/systemd/system/fastapi-dls.service
[Unit] [Unit]
Description=Service for fastapi-dls Description=Service for fastapi-dls
Documentation=https://git.collinwebdesigns.de/oscar.krause/fastapi-dls
After=network.target After=network.target
[Service] [Service]
@ -39,7 +37,6 @@ EOF
systemctl daemon-reload systemctl daemon-reload
# normally we would define configfiles in `conffiles` and as separate file, but we like to keep thinks simple.
if [[ ! -f $CONFIG_DIR/env ]]; then if [[ ! -f $CONFIG_DIR/env ]]; then
echo "> Writing initial config ..." echo "> Writing initial config ..."
touch $CONFIG_DIR/env touch $CONFIG_DIR/env

View File

@ -1,8 +1,8 @@
# Maintainer: samicrusader <hi@samicrusader.me>
# Maintainer: Oscar Krause <oscar.krause@collinwebdesigns.de> # Maintainer: Oscar Krause <oscar.krause@collinwebdesigns.de>
# Contributor: samicrusader <hi@samicrusader.me>
pkgname=fastapi-dls pkgname=fastapi-dls
pkgver=1.1 pkgver=0.0
pkgrel=1 pkgrel=1
pkgdesc='NVIDIA DLS server implementation with FastAPI' pkgdesc='NVIDIA DLS server implementation with FastAPI'
arch=('any') arch=('any')
@ -13,12 +13,10 @@ provider=("$pkgname")
install="$pkgname.install" install="$pkgname.install"
source=('git+file:///builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git source=('git+file:///builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
"$pkgname.default" "$pkgname.default"
"$pkgname.service" "$pkgname.service")
"$pkgname.tmpfiles")
sha256sums=('SKIP' sha256sums=('SKIP'
'fbd015449a30c0ae82733289a56eb98151dcfab66c91b37fe8e202e39f7a5edb' '4c07e9b627853bd4f3a398371912fc72302dac33f43e4cb7e9b79746cc9c9136'
'2719338541104c537453a65261c012dda58e1dbee99154cf4f33b526ee6ca22e' '10cb98d64f8bf37b11a60510793c187cc664e63c895d1205781c21fa2e703f32')
'93cceba2dd4bddc8b3c7122cba8798f67af2020020211f3e1e81b336d0470390')
pkgver() { pkgver() {
source $srcdir/$pkgname/version.env source $srcdir/$pkgname/version.env
@ -48,5 +46,4 @@ package() {
install -Dm755 "$srcdir/$pkgname/app/util.py" "$pkgdir/opt/$pkgname/util.py" install -Dm755 "$srcdir/$pkgname/app/util.py" "$pkgdir/opt/$pkgname/util.py"
install -Dm644 "$srcdir/$pkgname.default" "$pkgdir/etc/default/$pkgname" install -Dm644 "$srcdir/$pkgname.default" "$pkgdir/etc/default/$pkgname"
install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
} }

View File

@ -3,7 +3,6 @@ DEBUG=false
# Where the client can find the DLS server # Where the client can find the DLS server
## DLS_URL should be a hostname ## DLS_URL should be a hostname
LISTEN_IP="0.0.0.0"
DLS_URL="localhost.localdomain" DLS_URL="localhost.localdomain"
DLS_PORT=8443 DLS_PORT=8443
CORS_ORIGINS="https://$DLS_URL:$DLS_PORT" CORS_ORIGINS="https://$DLS_URL:$DLS_PORT"
@ -22,7 +21,3 @@ INSTANCE_REF="<<instanceref>>"
# Site-wide signing keys # Site-wide signing keys
INSTANCE_KEY_RSA="/var/lib/fastapi-dls/instance.private.pem" INSTANCE_KEY_RSA="/var/lib/fastapi-dls/instance.private.pem"
INSTANCE_KEY_PUB="/var/lib/fastapi-dls/instance.public.pem" INSTANCE_KEY_PUB="/var/lib/fastapi-dls/instance.public.pem"
# TLS certificate
INSTANCE_SSL_CERT="/var/lib/fastapi-dls/cert/webserver.crt"
INSTANCE_SSL_KEY="/var/lib/fastapi-dls/cert/webserver.key"

View File

@ -4,13 +4,12 @@ Documentation=https://git.collinwebdesigns.de/oscar.krause/fastapi-dls
After=network.target After=network.target
[Service] [Service]
Type=simple Type=forking
AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=/etc/default/fastapi-dls EnvironmentFile=/etc/default/fastapi-dls
ExecStart=/usr/bin/uvicorn main:app --proxy-headers --env-file=/etc/default/fastapi-dls --host=${LISTEN_IP} --port=${DLS_PORT} --app-dir=/opt/fastapi-dls --ssl-keyfile=${INSTANCE_SSL_KEY} --ssl-certfile=${INSTANCE_SSL_CERT} ExecStart=/usr/bin/python /opt/fastapi-dls/main.py
WorkingDir=/opt/fastapi-dls
Restart=on-abort Restart=on-abort
User=http User=root
Group=http
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1,2 +0,0 @@
d /var/lib/fastapi-dls 0755 http http
d /var/lib/fastapi-dls/cert 0755 http http

View File

@ -318,14 +318,6 @@ nvidia-smi -q | grep "License"
Download file and place it into `C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken`. Download file and place it into `C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken`.
Now restart `NvContainerLocalSystem` service. Now restart `NvContainerLocalSystem` service.
**Power-Shell**
```Shell
curl.exe --insecure -X GET https://<dls-hostname-or-ip>/client-token -o "C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken\client_configuration_token_$($(Get-Date).tostring('dd-MM-yy-hh-mm-ss')).tok"
Restart-Service NVDisplay.ContainerLocalSystem
'C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe' -q | Select-String "License"
```
# Troubleshoot # Troubleshoot
## Linux ## Linux