Download Dockerfile from dynstat/test2: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/spaces/dynstat/test2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/dynstat/test2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/dynstat/test2/resolve/main/Dockerfile
840 Bytes
| FROM python:3.9 | |
| # Install curl for testing | |
| RUN apt-get update && apt-get install -y curl | |
| # Set up user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| COPY --chown=user . . | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Test connectivity (this will run as the non-root user) | |
| RUN curl -v https://api.telegram.org || echo "Connectivity test failed, but continuing build" | |
| # RUN curl -v https://149.154.167.220 || echo "Connectivity test failed, but continuing build" | |
| RUN ping -c 4 8.8.8.8 || echo "Ping failed, but continuing" | |
| RUN nslookup api.telegram.org || echo "DNS lookup failed, but continuing" | |
| # RUN nslookup 149.154.167.220 || echo "DNS lookup failed, but continuing" | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |