Setup data dir in Docker and docker-compose

This commit is contained in:
2025-09-28 22:16:43 +02:00
parent 889a8707e7
commit cb2d95139f
2 changed files with 6 additions and 7 deletions

View File

@@ -9,10 +9,8 @@ RUN LATEST_VERSION=$(curl -s https://api.github.com/repos/lordmathis/llamactl/re
mv llamactl /usr/local/bin/ && \ mv llamactl /usr/local/bin/ && \
chmod +x /usr/local/bin/llamactl chmod +x /usr/local/bin/llamactl
# Create data directory for llamactl
RUN mkdir -p /data
# Set working directory # Set working directory
RUN mkdir -p /data
WORKDIR /data WORKDIR /data
# Expose the default llamactl port # Expose the default llamactl port

View File

@@ -12,7 +12,10 @@ services:
volumes: volumes:
- ./data/llamacpp:/data - ./data/llamacpp:/data
- ./models:/models # Mount models directory - ./models:/models # Mount models directory
- ~/.cache/llama.cpp:/root/.cache/llama.cpp # Llama.cpp cache
environment: environment:
# Set data directory for persistence
- LLAMACTL_DATA_DIR=/data
# Enable Docker mode for nested containers (if needed) # Enable Docker mode for nested containers (if needed)
- LLAMACTL_LLAMACPP_DOCKER_ENABLED=false - LLAMACTL_LLAMACPP_DOCKER_ENABLED=false
deploy: deploy:
@@ -37,6 +40,8 @@ services:
- ./models:/models # Mount models directory - ./models:/models # Mount models directory
- ~/.cache/huggingface:/root/.cache/huggingface # HuggingFace cache - ~/.cache/huggingface:/root/.cache/huggingface # HuggingFace cache
environment: environment:
# Set data directory for persistence
- LLAMACTL_DATA_DIR=/data
# Enable Docker mode for nested containers (if needed) # Enable Docker mode for nested containers (if needed)
- LLAMACTL_VLLM_DOCKER_ENABLED=false - LLAMACTL_VLLM_DOCKER_ENABLED=false
# vLLM specific environment variables # vLLM specific environment variables
@@ -49,7 +54,3 @@ services:
count: all count: all
capabilities: [gpu] capabilities: [gpu]
restart: unless-stopped restart: unless-stopped
networks:
default:
name: llamactl-network