Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files6 unmodified lines789101112131415161718191 unmodified line21222324256 unmodified lines# Buat direktori cache dan atur izinRUN mkdir -p /app/cache && chmod -R 777 /app/cache# Salin requirements.txt dan install dependensiCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Bersihkan cache lama (opsional, untuk mencegah error)RUN rm -rf /app/cache# Salin kode aplikasiCOPY app.py .1 unmodified lineENV HF_HOME=/app/cacheENV TRANSFORMERS_CACHE=/app/cache# Jalankan aplikasi dengan uvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]6 unmodified lines789101112131415161718191 unmodified line21222324252627286 unmodified lines# Buat direktori cache dan atur izinRUN mkdir -p /app/cache && chmod -R 777 /app/cache# Bersihkan cache lama (untuk mencegah error izin)RUN rm -rf /app/cache/* && chmod -R 777 /app/cache# Salin requirements.txt dan install dependensiCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Salin kode aplikasiCOPY app.py .1 unmodified lineENV HF_HOME=/app/cacheENV TRANSFORMERS_CACHE=/app/cache# Pastikan izin direktori cache tetap benar sebelum menjalankan aplikasiRUN chmod -R 777 /app/cache# Jalankan aplikasi dengan uvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+6-3