mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 09:04:27 +00:00
Refactor Dockerfile and docker-compose to streamline environment variable configuration and remove redundant commands
This commit is contained in:
@@ -9,16 +9,15 @@ 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
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENV LLAMACTL_LLAMACPP_COMMAND=/app/llama-server
|
ENV LLAMACTL_LLAMACPP_COMMAND=/app/llama-server
|
||||||
|
ENV LD_LIBRARY_PATH="/app:/usr/local/lib:/usr/lib"
|
||||||
|
|
||||||
# Set llamactl as the entrypoint
|
# Set llamactl as the entrypoint
|
||||||
ENTRYPOINT ["llamactl"]
|
ENTRYPOINT ["llamactl"]
|
||||||
@@ -13,8 +13,6 @@ services:
|
|||||||
- ./data/llamacpp:/data
|
- ./data/llamacpp:/data
|
||||||
- ./models:/models # Mount models directory
|
- ./models:/models # Mount models directory
|
||||||
environment:
|
environment:
|
||||||
# Configure llamactl to use llama-server from the base image
|
|
||||||
- LLAMACTL_LLAMACPP_COMMAND=llama-server
|
|
||||||
# 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:
|
||||||
@@ -39,9 +37,6 @@ 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:
|
||||||
# Configure llamactl to use vllm from the base image
|
|
||||||
- LLAMACTL_VLLM_COMMAND=vllm
|
|
||||||
- LLAMACTL_VLLM_ARGS=serve
|
|
||||||
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user