0.16.0: PUID/PGID, image, optional AUTH_SECRET, NAS ownership
1 parent
579f8f5011
commit
d6c8fb7a7b
2 files changed
+16
-12
No files matched your search
+13
-10
@@ -23,7 +23,7 @@ Kaname has no local accounts. Everyone signs in through your OIDC provider (test
|
||||
| Variable | Required | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `AUTH_URL` | yes | | The URL you open Kaname at, e.g. `http://192.168.1.10:3000` or `https://models.example.com`. Used to build the OIDC redirect URI. |
|
||||
| `AUTH_SECRET` | yes | | Random secret that encrypts the session cookie. Generate one with `openssl rand -base64 33`. Changing it signs everyone out. |
|
||||
| `AUTH_SECRET` | no | generated | Random secret that encrypts the session cookie. Empty: generated on first start and kept in the data folder (`.auth-secret`). To set your own: `openssl rand -base64 33`. Changing it signs everyone out. |
|
||||
| `OIDC_ISSUER` | yes | | Issuer URL of your provider, e.g. `https://auth.example.com`. Kaname reads `/.well-known/openid-configuration` from it. |
|
||||
| `OIDC_CLIENT_ID` | yes | | Client ID of the OIDC client you created for Kaname. |
|
||||
| `OIDC_CLIENT_SECRET` | yes | | Client secret of that client. |
|
||||
@@ -65,15 +65,17 @@ These are read by `compose.yaml` on the Docker host, not by the app itself.
|
||||
| `KANAME_DATA_DIR` | `./data` | Folder for the SQLite database, shared by the `web` and `worker` containers. **Must be on local disk**: SQLite does not work reliably over NFS/SMB. |
|
||||
| `KANAME_MODELS_DIR` | `./models` | Folder where models are downloaded to, as `<org>/<repo>/…`. Can be a NAS share mounted on the host, see [[Storing models on a NAS]]. |
|
||||
| `WEB_PORT` | `3000` | Port on the host where the web UI is published. |
|
||||
| `KANAME_VERSION` | `latest` | Image tag to run, e.g. `0.4.0`. Pin it if you only want to update deliberately. |
|
||||
| `KANAME_VERSION` | `latest` | Image tag to run, e.g. `0.16.0` (or `0.16` for the newest 0.16.x). Pin it if you only want to update deliberately. |
|
||||
| `KANAME_IMAGE` | `git.linxweiler.xyz/pascallinxweiler/kaname` | Image without the tag. Only for an image you built or mirrored yourself. The default is public: no login needed. |
|
||||
| `PUID`, `PGID` | `1000` | The user and group Kaname runs as, and that owns what it writes. |
|
||||
|
||||
Both folders must be writable by uid/gid **1000** (the user inside the container):
|
||||
The containers start as root only long enough to prepare the folders, then run as `PUID:PGID`:
|
||||
|
||||
```bash
|
||||
sudo chown 1000:1000 data models
|
||||
```
|
||||
|
||||
If one isn't, the container stops at startup with a message telling you which folder.
|
||||
- The **data folder** is Kaname's own; it is created if missing and given to `PUID:PGID`.
|
||||
- The **models folder** is given to `PUID:PGID` only if it is empty (e.g. just created). A folder
|
||||
that already has files is never changed: if Kaname can't write to it, the worker stops at startup
|
||||
and says so. Set `PUID`/`PGID` to the folder's owner (`ls -ln /mnt/nas/models`), or give that
|
||||
user write access on the host.
|
||||
|
||||
## Downloads
|
||||
|
||||
@@ -133,7 +135,6 @@ You normally don't set these: the image's defaults match the paths in `compose.y
|
||||
|
||||
```bash
|
||||
AUTH_URL=https://models.example.com
|
||||
AUTH_SECRET=change-me-openssl-rand-base64-33
|
||||
OIDC_ISSUER=https://auth.example.com
|
||||
OIDC_CLIENT_ID=0b5e…
|
||||
OIDC_CLIENT_SECRET=…
|
||||
@@ -144,7 +145,9 @@ HF_TOKEN=hf_…
|
||||
KANAME_DATA_DIR=./data
|
||||
KANAME_MODELS_DIR=/mnt/nas/models
|
||||
WEB_PORT=3000
|
||||
KANAME_VERSION=0.4.0
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
KANAME_VERSION=0.16
|
||||
|
||||
MAX_CONCURRENT_DOWNLOADS=2
|
||||
|
||||
|
||||
@@ -35,8 +35,9 @@ docker compose exec worker ls -la /models # should list the share's contents
|
||||
## Requirements
|
||||
|
||||
- **NFSv4.** The `hf` CLI uses file locks, which aren't reliable with NFSv3 or `nolock`.
|
||||
- **Writable for uid 1000.** The container runs as uid/gid 1000. On TrueNAS either make 1000 the
|
||||
owner of the dataset or set *Mapall User/Group* on the NFS share to a user with uid 1000.
|
||||
- **Writable for Kaname's user.** Kaname runs as uid/gid 1000 unless you set `PUID`/`PGID` in
|
||||
`.env`. Either set those to the share's owner (`ls -ln /mnt/nas/models`), make 1000 the owner of
|
||||
the dataset, or on TrueNAS set *Mapall User/Group* on the NFS share to that user.
|
||||
- **Mounted before Docker starts.** `_netdev` makes the mount wait for the network. If the share
|
||||
isn't mounted when the worker starts, Docker uses the empty local folder and models end up on the
|
||||
host's disk. After mounting later, recreate the worker (`docker compose up -d --force-recreate worker`).
|
||||
|
||||
Reference in new issue
Block a user