Spaces:
Paused
Paused
Adarsh Kumar commited on
Update Dockerfile
Browse files1234567891011121314151617181920212223242526# ---# title: SILK# emoji: "🧵"# sdk: docker# app_file: Server.py# app_port: 7860# ---FROM python:3.12-slimRUN groupadd --gid 1000 appuser && useradd --uid 1000 --gid 1000 --create-home appuserWORKDIR /appCOPY requirements.txt ./RUN pip install --no-cache-dir -r requirements.txt && rm -rf ~/.cache/pipCOPY app/ ./app/COPY web/ ./web/COPY run.py Server.py ./ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 \HOST=0.0.0.0 PORT=7860 LOG_LEVEL=info \TRUSTED_PROXIES=127.0.0.1,::1 FORWARD_CLIENT_IP=1 HOST_GUARD=1 \MAX_CONCURRENCY=4 RATE_LIMIT_REQUESTS=12 RATE_LIMIT_WINDOW=60RUN chown -R appuser:appuser /appUSER appuserEXPOSE 7860HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \CMD python -c "import urllib.request,sys; \sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:7860/healthcheck',timeout=4).status==200 else 1)"CMD ["python", "run.py"]1234567git clone -b arena/01a0bd10-serv https://github.com/Adarshukumar/serv__.git silkcd silkdocker compose up --build # → http://localhost:7860# or the bare form:docker build -t silk:local .docker run --rm -p 7860:7860 -e TRUSTED_PROXIES="" silk:local
Dockerfile+7-26