Download Dockerfile from gtech13/Topic-Modeling-BERTopic-Math-Visualization: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/spaces/gtech13/Topic-Modeling-BERTopic-Math-Visualization/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gtech13/Topic-Modeling-BERTopic-Math-Visualization/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gtech13/Topic-Modeling-BERTopic-Math-Visualization/resolve/main/Dockerfile
648 Bytes
| FROM python:3.10 | |
| # 1. Create the specific user required by Hugging Face Spaces | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # 2. Set the working directory to that user's safe space | |
| WORKDIR /home/user/app | |
| # 3. Copy requirements and install them securely | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --user --no-cache-dir -r requirements.txt | |
| # 4. Copy your app.py and images into the safe space | |
| COPY --chown=user:user . . | |
| # 5. Launch using the Python Module bypass (The Fix!) | |
| CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"] |