yt / Dockerfile
OrbitMC's picture
Update Dockerfile
7c0e5b0 verified
raw
history blame contribute delete
765 Bytes
# Use a slim Python image for efficiency
FROM python:3.11-slim
# Set the working directory
WORKDIR /app
# Install system dependencies if needed (none strictly required for aiohttp, but good practice)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Hugging Face Spaces run on port 7860 by default
ENV SERVER_PORT=7860
# You should set these in the Hugging Face Space Settings (Secrets),
# but we set defaults here to prevent the app from crashing.
ENV ADMIN_PATH=/admin-panel
# Expose the port
EXPOSE 7860
# Run the application
CMD ["python", "main.py"]