fix: properly set /data ownership

add-more-languages
Meng Zhang 2023-04-05 23:13:34 +08:00
parent bc25593f93
commit c46142385b
3 changed files with 26 additions and 1 deletions

View File

@ -28,10 +28,13 @@ An opensource / on-prem alternative to GitHub Copilot.
The easiest way of getting started is using the official docker image:
```bash
# Create data dir and grant owner to 1000 (Tabby run as uid 1000 in container)
mkdir -p data/hf_cache && chown -R 1000 data
docker run \
-it --rm \
-v ./data:/data \
-v ./data/hf_cache:/root/.cache/huggingface \
-v ./data/hf_cache:/home/app/.cache/huggingface \
-p 5000:5000 \
-p 8501:8501 \
-p 8080:8080 \

View File

@ -1,6 +1,15 @@
version: '3.3'
services:
init:
image: tabbyml/tabby
container_name: init
user: root
volumes:
- ${DATA_VOLUME}
- ${HF_VOLUME}
command: chown -R 1000 /data
tabby:
image: tabbyml/tabby
container_name: tabby
@ -18,3 +27,5 @@ services:
interval: 2s
timeout: 2s
start_period: 1200s
depends_on:
- init

View File

@ -1,6 +1,15 @@
version: '3.3'
services:
init:
image: tabbyml/tabby
container_name: init
user: root
volumes:
- ${DATA_VOLUME}
- ${HF_VOLUME}
command: chown -R 1000 /data
tabby:
image: tabbyml/tabby
container_name: tabby
@ -28,3 +37,5 @@ services:
- driver: nvidia
count: all
capabilities: [gpu]
depends_on:
- init