Spaces:
Paused
Paused
File size: 1,979 Bytes
a236b31 3a5193a a236b31 3a5193a 2882809 69c1d37 4ba28b5 7f79495 0f01e5a 4ba28b5 d718e62 0f01e5a 69c1d37 a236b31 2882809 63b28ec a236b31 c7f7396 a236b31 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # FROM ollama/ollama:0.12.3
FROM ollama/ollama:latest
RUN apt update
RUN apt upgrade -y
# OLLAMA_DEBUG Show additional debug information (e.g. OLLAMA_DEBUG=1)
# OLLAMA_HOST IP Address for the ollama server (default 127.0.0.1:11434)
# OLLAMA_CONTEXT_LENGTH Context length to use unless otherwise specified (default: 4096)
# OLLAMA_KEEP_ALIVE The duration that models stay loaded in memory (default "5m")
# OLLAMA_MAX_LOADED_MODELS Maximum number of loaded models per GPU
# OLLAMA_MAX_QUEUE Maximum number of queued requests
# OLLAMA_MODELS The path to the models directory
# OLLAMA_NUM_PARALLEL Maximum number of parallel requests
# OLLAMA_NOPRUNE Do not prune model blobs on startup
# OLLAMA_ORIGINS A comma separated list of allowed origins
# OLLAMA_SCHED_SPREAD Always schedule model across all GPUs
# OLLAMA_FLASH_ATTENTION Enabled flash attention
# OLLAMA_KV_CACHE_TYPE Quantization type for the K/V cache (default: f16)
# OLLAMA_LLM_LIBRARY Set LLM library to bypass autodetection
# OLLAMA_GPU_OVERHEAD Reserve a portion of VRAM per GPU (bytes)
# OLLAMA_LOAD_TIMEOUT
ENV OLLAMA_KEEP_ALIVE="24h"
ENV OLLAMA_HOST=0.0.0.0:7861
ENV OLLAMA_LOAD_TIMEOUT="24h"
RUN apt-get update && apt-get upgrade -y
RUN apt-get install git g++ python3 python3-pip -y && apt-get clean
COPY requirements.txt requirements.txt
COPY pull06.sh pull06.sh
COPY pull17.sh pull17.sh
COPY pull4.sh pull4.sh
COPY pull8.sh pull8.sh
#RUN /bin/bash -x pull06.sh
# RUN /bin/bash -x pull8.sh
COPY pull14.sh pull14.sh
# RUN /bin/bash -x pull14.sh
RUN pip install --no-cache-dir -r requirements.txt --break-system-packages
VOLUME vol1 vol2
COPY main.py main.py
COPY util.py util.py
COPY start.sh start.sh
#ENTRYPOINT ["/usr/bin/ollama", "serve"]
ENTRYPOINT ["/bin/bash", "-x", "start.sh"]
|