Compare commits
4 Commits
3d83e533da
...
73ffae76b6
Author | SHA1 | Date | |
---|---|---|---|
73ffae76b6 | |||
5fc9fc8e0a | |||
b0e10004f1 | |||
478ca0ab63 |
@ -6,10 +6,12 @@ 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]
|
||||||
@ -37,6 +39,7 @@ 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
|
||||||
|
@ -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=0.0
|
pkgver=1.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='NVIDIA DLS server implementation with FastAPI'
|
pkgdesc='NVIDIA DLS server implementation with FastAPI'
|
||||||
arch=('any')
|
arch=('any')
|
||||||
@ -13,10 +13,12 @@ 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'
|
||||||
'4c07e9b627853bd4f3a398371912fc72302dac33f43e4cb7e9b79746cc9c9136'
|
'fbd015449a30c0ae82733289a56eb98151dcfab66c91b37fe8e202e39f7a5edb'
|
||||||
'10cb98d64f8bf37b11a60510793c187cc664e63c895d1205781c21fa2e703f32')
|
'2719338541104c537453a65261c012dda58e1dbee99154cf4f33b526ee6ca22e'
|
||||||
|
'93cceba2dd4bddc8b3c7122cba8798f67af2020020211f3e1e81b336d0470390')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
source $srcdir/$pkgname/version.env
|
source $srcdir/$pkgname/version.env
|
||||||
@ -46,4 +48,5 @@ 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"
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ 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"
|
||||||
@ -21,3 +22,7 @@ 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"
|
||||||
|
@ -4,12 +4,13 @@ Documentation=https://git.collinwebdesigns.de/oscar.krause/fastapi-dls
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=simple
|
||||||
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
EnvironmentFile=/etc/default/fastapi-dls
|
EnvironmentFile=/etc/default/fastapi-dls
|
||||||
ExecStart=/usr/bin/python /opt/fastapi-dls/main.py
|
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}
|
||||||
WorkingDir=/opt/fastapi-dls
|
|
||||||
Restart=on-abort
|
Restart=on-abort
|
||||||
User=root
|
User=http
|
||||||
|
Group=http
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
2
.PKGBUILD/fastapi-dls.tmpfiles
Normal file
2
.PKGBUILD/fastapi-dls.tmpfiles
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
d /var/lib/fastapi-dls 0755 http http
|
||||||
|
d /var/lib/fastapi-dls/cert 0755 http http
|
@ -318,6 +318,14 @@ 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
|
||||||
|
Loading…
Reference in New Issue
Block a user