oki0ki commited on
Commit
4027397
·
verified ·
1 Parent(s): 8524a15

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.11-slim
2
 
3
- # Zmienne środowiskowe dla optymalizacji
4
  ENV PYTHONUNBUFFERED=1 \
5
  PORT=7860 \
6
  LLAMA_NO_CUDA=1 \
@@ -17,18 +17,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Instalacja Python dependencies
20
- # Ważne: Najpierw uvicorn/fastapi, potem llama-cpp-python
21
  RUN pip install --no-cache-dir \
22
  huggingface_hub>=0.24.0 \
23
- uvicorn>=0.30.0 \
24
- fastapi>=0.115.0 \
 
 
25
  pydantic-settings \
26
- llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
27
 
28
  WORKDIR /app
29
  COPY app.py .
30
 
31
  EXPOSE 7860
32
 
33
- # Uruchomienie skryptu startowego
34
  CMD ["python", "app.py"]
 
1
  FROM python:3.11-slim
2
 
3
+ # Zmienne środowiskowe
4
  ENV PYTHONUNBUFFERED=1 \
5
  PORT=7860 \
6
  LLAMA_NO_CUDA=1 \
 
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Instalacja Python dependencies
20
+ # Ważne: Instalujemy wszystkie zależności serwera HTTP razem
21
  RUN pip install --no-cache-dir \
22
  huggingface_hub>=0.24.0 \
23
+ uvicorn==0.30.1 \
24
+ fastapi==0.115.0 \
25
+ starlette==0.37.2 \
26
+ sse-starlette==2.1.0 \
27
  pydantic-settings \
28
+ llama-cpp-python==0.3.2 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
29
 
30
  WORKDIR /app
31
  COPY app.py .
32
 
33
  EXPOSE 7860
34
 
 
35
  CMD ["python", "app.py"]