Spaces:
Sleeping
Sleeping
Download Dockerfile from InfiniteTsukuyomi/Detector: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/spaces/InfiniteTsukuyomi/Detector/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/InfiniteTsukuyomi/Detector/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/InfiniteTsukuyomi/Detector/resolve/main/Dockerfile
629 Bytes
| FROM python:3.9 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create cache directory and set permissions | |
| RUN mkdir -p /app/cache && chmod -R 777 /app/cache | |
| # Set Hugging Face cache directory | |
| ENV HF_HOME=/app/cache | |
| # Pre-download the model to avoid runtime download issues | |
| RUN python -c "from transformers import AutoTokenizer, AutoModelForMaskedLM; AutoTokenizer.from_pretrained('microsoft/codebert-base-mlm'); AutoModelForMaskedLM.from_pretrained('microsoft/codebert-base-mlm')" | |
| COPY . . | |
| EXPOSE 8501 | |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |