ciyidogan commited on
Commit
4b790c9
·
verified ·
1 Parent(s): ceef416

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # ============================== BASE IMAGE ==============================
2
  # Build Angular UI
3
  FROM node:18-slim AS angular-build
4
 
@@ -41,8 +41,8 @@ FROM python:3.10-slim
41
  # ====================== SYSTEM-LEVEL DEPENDENCIES ======================
42
  # gcc & friends → bcrypt / uvicorn[standard] gibi C eklentilerini derlemek için
43
  RUN apt-get update \
44
- && apt-get install -y --no-install-recommends gcc g++ make libffi-dev \
45
- && rm -rf /var/lib/apt/lists/*
46
 
47
  # ============================== WORKDIR ================================
48
  WORKDIR /app
@@ -50,7 +50,7 @@ WORKDIR /app
50
  # ===================== HF CACHE & WRITE PERMS ==========================
51
  # Hugging Face Spaces özel dizinleri – yazma izni 777
52
  RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache \
53
- && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache
54
 
55
  ENV HF_HOME=/app/.cache \
56
  HF_DATASETS_CACHE=/app/.cache \
@@ -65,8 +65,14 @@ RUN pip install --no-cache-dir -r requirements.txt
65
  # ============================== APP CODE ===============================
66
  COPY . .
67
 
68
- # Config dosyasına ve app klasörüne yazma izni ver
69
- RUN chmod 666 service_config.jsonc && chmod 755 /app
 
 
 
 
 
 
70
 
71
  # ✅ Angular build output'u kopyalanıyor
72
  COPY --from=angular-build /app/flare-ui/dist/flare-ui ./static
 
1
+ dockerfile# ============================== BASE IMAGE ==============================
2
  # Build Angular UI
3
  FROM node:18-slim AS angular-build
4
 
 
41
  # ====================== SYSTEM-LEVEL DEPENDENCIES ======================
42
  # gcc & friends → bcrypt / uvicorn[standard] gibi C eklentilerini derlemek için
43
  RUN apt-get update \
44
+ && apt-get install -y --no-install-recommends gcc g++ make libffi-dev \
45
+ && rm -rf /var/lib/apt/lists/*
46
 
47
  # ============================== WORKDIR ================================
48
  WORKDIR /app
 
50
  # ===================== HF CACHE & WRITE PERMS ==========================
51
  # Hugging Face Spaces özel dizinleri – yazma izni 777
52
  RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache \
53
+ && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache
54
 
55
  ENV HF_HOME=/app/.cache \
56
  HF_DATASETS_CACHE=/app/.cache \
 
65
  # ============================== APP CODE ===============================
66
  COPY . .
67
 
68
+ # Config dizini ve dosya izinleri - HF Spaces için özel ayarlar
69
+ # Tüm app dizinine ve config dosyasına herkesin yazabilmesi için 777
70
+ RUN chmod -R 777 /app && \
71
+ touch /app/service_config.jsonc && \
72
+ chmod 777 /app/service_config.jsonc && \
73
+ # Ayrıca bir .tmp uzantılı dosya da oluştur izinlerle
74
+ touch /app/service_config.tmp && \
75
+ chmod 777 /app/service_config.tmp
76
 
77
  # ✅ Angular build output'u kopyalanıyor
78
  COPY --from=angular-build /app/flare-ui/dist/flare-ui ./static