youtube-downloader / Dockerfile
jasonanugrah's picture
Create Dockerfile
564bd4b verified
raw
history blame
523 Bytes
FROM python:3.9-slim
# Instal FFmpeg (Wajib untuk 4K dan konversi MP3)
RUN apt-get update && \
apt-get install -y ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Setup folder kerja
WORKDIR /app
# Copy semua file ke dalam container
COPY . .
# Buat folder downloads dan beri izin tulis (PENTING di Hugging Face)
RUN mkdir -p downloads && chmod 777 downloads
# Install library python
RUN pip install --no-cache-dir -r requirements.txt
# Jalankan aplikasi di port 7860 (Port wajib Hugging Face)
CMD ["python", "app.py"]