From 9563d7bb98501412522ef05b53d8ff26d558d78e Mon Sep 17 00:00:00 2001 From: zzw <1464003642@qq.com> Date: Tue, 15 Sep 2026 10:01:41 +0800 Subject: [PATCH] fix: use gpu --- Dockerfile | 2 +- docker-compose.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a6179e..79aec67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM skin-py-cpu-base:v1.0.2 +FROM skin-py-gpu:1.0.0 WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index 248c7ec..122f7cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: skin-py-analysis: build: /data/www/pifu - image: analysis-py:latest + image: skin-py-gpu:1.0.0 working_dir: /app ports: - "8000:8000" @@ -16,8 +16,12 @@ services: MAX_PENDING_TASKS: 100 MODEL_PATH: /app/best.pt IMAGE_WORKERS: 4 + + NVIDIA_VISIBLE_DEVICES: all + NVIDIA_DRIVER_CAPABILITIES: compute,utility command: python api_server.py restart: unless-stopped + gpus: all networks: - default - common-network