fix triton
This commit is contained in:
parent
1a771d4d4a
commit
10de6ef60a
|
|
@ -9,6 +9,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
|||
MODEL_SERVER_MODELS_DIR=/models \
|
||||
HF_HOME=/models/huggingface \
|
||||
TORCH_HOME=/models/torch \
|
||||
TRITON_CACHE_DIR=/models/cache/triton \
|
||||
XDG_CACHE_HOME=/models/cache
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -33,13 +33,13 @@ An API key is optional. Set `API_KEY` to enable it and send `Authorization: Bear
|
|||
Requests wait for their queued job by default. Set `async_job=true` (multipart field for audio, JSON field for chat) to immediately receive a job ID, then poll `GET /v1/jobs/{id}`.
|
||||
|
||||
```bash
|
||||
curl -F file=@speech.wav -F language=en http://localhost:8000/v1/audio/transcriptions
|
||||
curl -F file=@speech.wav -F language=en http://localhost:9000/v1/audio/transcriptions
|
||||
|
||||
curl -F file=@meeting.wav -F min_speakers=2 http://localhost:8000/v1/audio/diarizations
|
||||
curl -F file=@meeting.wav -F min_speakers=2 http://localhost:9000/v1/audio/diarizations
|
||||
|
||||
curl -F file=@speech.wav http://localhost:8000/v1/audio/emotions
|
||||
curl -F file=@speech.wav http://localhost:9000/v1/audio/emotions
|
||||
|
||||
curl http://localhost:8000/v1/chat/completions \
|
||||
curl http://localhost:9000/v1/chat/completions \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"messages":[{"role":"user","content":"Hello"}],"max_tokens":128}'
|
||||
```
|
||||
|
|
@ -52,7 +52,7 @@ For local development (with a CUDA-enabled PyTorch environment already available
|
|||
python -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install -e '.[test]'
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 1
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 9000 --workers 1
|
||||
pytest
|
||||
```
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ from the repository checkout:
|
|||
sudo env HF_TOKEN=hf_... ./scripts/install-host.sh
|
||||
sudoedit /etc/llmserver/llmserver.env
|
||||
sudo systemctl restart llmserver
|
||||
curl http://127.0.0.1:8000/healthz
|
||||
curl http://127.0.0.1:9000/healthz
|
||||
```
|
||||
|
||||
The installer creates a dedicated `llmserver` account, a virtual environment
|
||||
|
|
|
|||
|
|
@ -10,10 +10,14 @@ Group=llmserver
|
|||
WorkingDirectory=/srv/llmserver/data
|
||||
EnvironmentFile=/etc/llmserver/llmserver.env
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
Environment=HOME=/srv/llmserver
|
||||
Environment=HF_HOME=/srv/llmserver/models/huggingface
|
||||
Environment=TORCH_HOME=/srv/llmserver/models/cache/torch
|
||||
Environment=TRITON_CACHE_DIR=/srv/llmserver/models/cache/triton
|
||||
Environment=XDG_CACHE_HOME=/srv/llmserver/models/cache
|
||||
Environment=MODEL_SERVER_DATA_DIR=/srv/llmserver/data
|
||||
Environment=MODEL_SERVER_MODELS_DIR=/srv/llmserver/models
|
||||
ExecStart=/opt/llmserver/venv/bin/python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 1
|
||||
ExecStart=/opt/llmserver/venv/bin/python -m uvicorn app.main:app --host 0.0.0.0 --port 9000 --workers 1
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
TimeoutStopSec=90s
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ fi
|
|||
if ! id -u llmserver >/dev/null 2>&1; then
|
||||
useradd --system --gid llmserver --home-dir /srv/llmserver \
|
||||
--shell /usr/sbin/nologin llmserver
|
||||
else
|
||||
usermod --home /srv/llmserver llmserver
|
||||
fi
|
||||
|
||||
install -d -m 0755 "${INSTALL_DIR}" "${CONFIG_DIR}"
|
||||
|
|
@ -62,7 +64,12 @@ chown root:llmserver "${CONFIG_DIR}/llmserver.env"
|
|||
chmod 0640 "${CONFIG_DIR}/llmserver.env"
|
||||
|
||||
install -d -o llmserver -g llmserver -m 0755 \
|
||||
/srv/llmserver /srv/llmserver/models /srv/llmserver/data
|
||||
/srv/llmserver \
|
||||
/srv/llmserver/models \
|
||||
/srv/llmserver/models/cache \
|
||||
/srv/llmserver/models/cache/torch \
|
||||
/srv/llmserver/models/cache/triton \
|
||||
/srv/llmserver/data
|
||||
chown -R llmserver:llmserver /srv/llmserver
|
||||
|
||||
echo "Downloading configured models (this can take a while)..."
|
||||
|
|
@ -86,4 +93,4 @@ echo "Installation complete."
|
|||
echo "Configuration: ${CONFIG_DIR}/llmserver.env"
|
||||
echo "Status: systemctl status llmserver"
|
||||
echo "Logs: journalctl -u llmserver -f"
|
||||
echo "Health check: curl http://127.0.0.1:8000/healthz"
|
||||
echo "Health check: curl http://127.0.0.1:9000/healthz"
|
||||
|
|
|
|||
Loading…
Reference in New Issue