Spaces:
Runtime error
Runtime error
Download Dockerfile from shasee/pulltime-storage: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/shasee/pulltime-storage/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/shasee/pulltime-storage/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/shasee/pulltime-storage/resolve/main/Dockerfile
1.07 kB
| FROM python:3.11-slim | |
| WORKDIR /bootstrap | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| bash git ca-certificates curl openssh-client rsync unar \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && (curl -fsSL -o /tmp/rar.tar.gz https://www.rarlab.com/rar/rarlinux-x64-712.tar.gz \ | |
| || curl -fsSL -o /tmp/rar.tar.gz https://www.rarlab.com/rar/rarlinux-x64-623.tar.gz) \ | |
| && tar -xzf /tmp/rar.tar.gz -C /tmp \ | |
| && install -m 0755 /tmp/rar/unrar /usr/local/bin/unrar \ | |
| && rm -rf /tmp/rar /tmp/rar.tar.gz \ | |
| && unrar | head -2 \ | |
| || echo "WARNING: unrar kurulamadi, rar acmada unar fallback kullanilacak" | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| COPY start.sh /bootstrap/start.sh | |
| RUN chmod +x /bootstrap/start.sh | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ | |
| CMD python3 -c "import http.client; c=http.client.HTTPConnection('127.0.0.1',int(__import__('os').environ.get('PORT','7860')),timeout=5); c.request('GET','/api/health'); r=c.getresponse(); exit(0 if r.status==200 else 1)" | |
| CMD ["/bootstrap/start.sh"] | |