OjciecTadeusz commited on
Commit
d6e4689
·
verified ·
1 Parent(s): 922765a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Użyj oficjalnego obrazu Pythona
2
+ FROM python:3.12-slim
3
+
4
+ # Ustaw katalog roboczy
5
+ WORKDIR /app
6
+
7
+ # Skopiuj zależności i zainstaluj je
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Skopiuj pozostałe pliki aplikacji
12
+ COPY . .
13
+
14
+ # Ustaw zmienną środowiskową dla tokenu
15
+ ENV HF_API_TOKEN=twoj_token_tutaj
16
+
17
+ # Ustaw port
18
+ EXPOSE 7860
19
+
20
+ # Uruchom serwer FastAPI
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]