Spaces:
Sleeping
Sleeping
| # Use a modern, supported Debian base (Bookworm) | |
| FROM python:3.9-slim-bookworm | |
| # Set environment variables to keep apt quiet | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Combine updates and installs into one layer to save space | |
| RUN apt-get update && apt-get upgrade -y && \ | |
| apt-get install -y --no-install-recommends \ | |
| git \ | |
| curl \ | |
| wget \ | |
| bash \ | |
| neofetch \ | |
| ffmpeg \ | |
| software-properties-common && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY . /app | |
| # Upgrade pip and install requirements | |
| RUN pip3 install --no-cache-dir -U pip redis fastapi nest-asyncio uvicorn && \ | |
| pip3 install --no-cache-dir -r requirements.txt | |
| # Permissions | |
| # Note: Changing permissions on /usr is generally discouraged unless strictly necessary | |
| RUN chown -R 1000:0 /app && \ | |
| chmod -R 755 /app && \ | |
| chmod +x /app/start | |
| EXPOSE 5000 8000 | |
| CMD ["./start"] | |