Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +1 -0
Dockerfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
dockerfile <br># Base image with Python 3.11 (works on HF’s infrastructure) <br>FROM python:3.11-slim <br> <br># Create a non‑root user (required for HF dev‑mode) <br>RUN useradd -m -u 1000 user <br>WORKDIR /app <br> <br># Install the Python dependencies <br>COPY --chown=user ./requirements.txt requirements.txt <br>RUN pip install --no‑cache-dir -r requirements.txt <br> <br># Copy the app code <br>COPY --chown=user . /app <br> <br># Expose the port HF will set in $PORT (default 7860) <br>ENV PORT=7860 <br>CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] <br>
|