Spaces:
Sleeping
Sleeping
Download Dockerfile from BuiltByHQ/edgehomes-embedding: direct link, hf CLI and curl.
- Browser
- Download file 768 Bytes
-
https://huggingface.co/spaces/BuiltByHQ/edgehomes-embedding/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BuiltByHQ/edgehomes-embedding/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BuiltByHQ/edgehomes-embedding/resolve/main/Dockerfile
768 Bytes
| # HuggingFace Spaces Docker Container for EdgeHomes Embedding API | |
| FROM python:3.10 | |
| # Create user with ID 1000 (required by HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install dependencies with proper ownership | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy application code with proper ownership | |
| COPY --chown=user ./app.py app.py | |
| # Switch to non-root user | |
| USER user | |
| # Set environment variables | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Expose port 7860 (HF Spaces standard) | |
| EXPOSE 7860 | |
| # Start FastAPI app on port 7860, bound to all interfaces | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |