Spaces:
Sleeping
Sleeping
Download Dockerfile from Jaita/chatbot-fastapi-backend: direct link, hf CLI and curl.
- Browser
- Download file 810 Bytes
-
https://huggingface.co/spaces/Jaita/chatbot-fastapi-backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Jaita/chatbot-fastapi-backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Jaita/chatbot-fastapi-backend/resolve/main/Dockerfile
810 Bytes
| #FROM python:3.11 | |
| #WORKDIR /app | |
| #COPY requirements.txt . | |
| #RUN pip install -r requirements.txt | |
| #COPY . . | |
| #CMD ["uvicorn","app.main:app","--host","0.0.0.0","--port","7860"] | |
| FROM python:3.11 | |
| # Inside the container, we'll work from /app. This is just a path. | |
| WORKDIR /app | |
| # Install dependencies first (better layer caching) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your source files | |
| COPY . . | |
| # Helpful envs | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 | |
| RUN mkdir -p /data && chmod -R 777 /data | |
| # Expose your port (change if you prefer 8000) | |
| EXPOSE 7860 | |
| # Run Uvicorn pointing to your ASGI app in main.py | |
| # Using `python -m uvicorn` is more reliable in containers | |
| CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |