Download Dockerfile from Fred808/TLD1: direct link, hf CLI and curl.
- Browser
- Download file 689 Bytes
-
https://huggingface.co/spaces/Fred808/TLD1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fred808/TLD1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fred808/TLD1/resolve/main/Dockerfile
689 Bytes
| # Use slim Python 3.11 image | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| RUN apt-get update && apt-get install -y \ | |
| gcc curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| COPY telegram_session_data.bin my_session.session # 🟢 Renamed safe copy | |
| COPY templates/ templates/ | |
| COPY static/ static/ | |
| RUN mkdir -p downloads | |
| RUN chmod -R 777 /app | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/ || exit 1 | |
| CMD ["python", "app.py"] | |