monikahung commited on
Commit
7bc170e
·
1 Parent(s): cdb8f24

Update Space in Dockerfile & requirements

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -2
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -1,12 +1,16 @@
1
- # Menggunakan image Python dasar
2
  FROM python:3.10
3
 
4
  # Atur direktori kerja di dalam container
5
  WORKDIR /app
6
 
7
- # Instal FFmpeg, pustaka yang diperlukan untuk mengolah video
8
  RUN apt-get update && apt-get install -y ffmpeg
9
 
 
 
 
 
10
  # Salin file requirements.txt dan instal dependensi Python
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
 
1
+ # Gunakan image Python dasar
2
  FROM python:3.10
3
 
4
  # Atur direktori kerja di dalam container
5
  WORKDIR /app
6
 
7
+ # Instal FFmpeg dari repositori sistem
8
  RUN apt-get update && apt-get install -y ffmpeg
9
 
10
+ # Setel variabel lingkungan untuk direktori cache Hugging Face
11
+ # Ini akan mengarahkan semua unduhan model ke direktori /app/.cache
12
+ ENV HF_HOME /app/.cache/huggingface
13
+
14
  # Salin file requirements.txt dan instal dependensi Python
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  gradio
2
  torch
3
- transformers
4
  opencv-python
5
  Pillow
6
  accelerate
 
1
  gradio
2
  torch
3
+ transformers==4.42.0
4
  opencv-python
5
  Pillow
6
  accelerate