File size: 830 Bytes
6d837ec a768d7e 6d837ec b8bd349 6d837ec a768d7e b8bd349 d2820ac b8bd349 6d837ec a768d7e 6d837ec a768d7e 6d837ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | FROM python:3.11-slim
WORKDIR /app
# Install system dependencies (megatools for the bot, ffmpeg for video)
RUN apt-get update && apt-get install -y \
megatools \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Create writable directories for session and downloads
# This now includes the 'downloads' folder inside /data
RUN mkdir -p /data/downloads && chmod -R 777 /data
# Copy and install Python requirements
# We install directly to avoid 'requirements.txt' errors
RUN pip install --no-cache-dir \
humanize \
pymegatools \
telebot \
requests \
flask
# Copy all application files
COPY main.py .
COPY app.py .
COPY start.sh .
# Make the start script executable
RUN chmod +x start.sh
# Expose the web server port (default 7860 for HF Spaces)
EXPOSE 7860
# Run the start script
CMD ["./start.sh"]
|