oki0ki commited on
Commit
2085209
·
verified ·
1 Parent(s): 47e4282

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Minimalne zależności systemowe
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ curl \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Konfiguracja środowiska
9
+ ENV PYTHONUNBUFFERED=1 \
10
+ PORT=7860 \
11
+ LLAMA_NO_CUDA=1 \
12
+ LLAMA_NO_METAL=1 \
13
+ LLAMA_NO_VULKAN=1 \
14
+ USE_MMAP=1 \
15
+ USE_MLOCK=0 \
16
+ FLASH_ATTN=0 \
17
+ UVICORN_LIMIT_CONCURRENCY=3 \
18
+ UVICORN_TIMEOUT_KEEP_ALIVE=120 \
19
+ UVICORN_LOG_LEVEL=info
20
+
21
+ # Instalacja zależności + gotowe wheel CPU dla llama-cpp-python (brak kompilacji!)
22
+ RUN pip install --no-cache-dir \
23
+ huggingface_hub>=0.24.0 \
24
+ llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
25
+
26
+ WORKDIR /app
27
+ COPY app.py .
28
+
29
+ EXPOSE 7860
30
+
31
+ # Entrypoint: pobranie modelu → uruchomienie serwera OpenAI-compatible
32
+ CMD ["python", "app.py"]