Spaces:
Sleeping
Sleeping
Download Dockerfile from coderMayank69/Synapse_Code_Auditor: direct link, hf CLI and curl.
- Browser
- Download file 668 Bytes
-
https://huggingface.co/spaces/coderMayank69/Synapse_Code_Auditor/resolve/147b2e17728df80406f4db900ae104f2e3bf10a3/Dockerfile
- Command line
-
hf download hf://spaces/coderMayank69/Synapse_Code_Auditor@147b2e17728df80406f4db900ae104f2e3bf10a3/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/coderMayank69/Synapse_Code_Auditor/resolve/147b2e17728df80406f4db900ae104f2e3bf10a3/Dockerfile
668 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| ENV PIP_DEFAULT_TIMEOUT=240 | |
| ENV PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| WORKDIR /app | |
| RUN useradd -m -u 1000 appuser | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir --retries 10 -r requirements.txt | |
| COPY . . | |
| RUN chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7860/health', timeout=3)" | |
| CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860}"] | |