ciyidogan commited on
Commit
78498f4
·
verified ·
1 Parent(s): 49817f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,25 +1,23 @@
1
- # ✅ Temel Python imajı
2
- FROM python:3.10-slim
3
 
4
- # Sistem bağımlılıkları
5
- RUN apt-get update && apt-get install -y gcc g++ make
6
-
7
- # ✅ Hugging Face Spaces özel dizinleri
8
- RUN mkdir -p /app/.cache && chmod -R 777 /app
9
 
10
  ENV HF_HOME=/app/.cache \
11
  HF_DATASETS_CACHE=/app/.cache \
12
  HF_HUB_CACHE=/app/.cache
13
 
14
- # ✅ Çalışma dizini
15
  WORKDIR /app
16
 
17
- # Gereksinimler
 
 
 
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Uygulama dosyası
22
  COPY app.py .
23
 
24
- # Uygulamayı başlat
25
- CMD ["python", "app.py"]
 
1
+ FROM python:3.9-slim
 
2
 
3
+ # Hugging Face Spaces özel dizinleri
4
+ RUN mkdir -p /data/chunks /data/tokenized_chunks && chmod -R 777 /data
 
 
 
5
 
6
  ENV HF_HOME=/app/.cache \
7
  HF_DATASETS_CACHE=/app/.cache \
8
  HF_HUB_CACHE=/app/.cache
9
 
 
10
  WORKDIR /app
11
 
12
+ # Gerekli sistem paketlerini yükle
13
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Python bağımlılıklarını yükle
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Uygulama dosyalarını kopyala
20
  COPY app.py .
21
 
22
+ # Uygulamayı başlat
23
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]