Download Dockerfile from Mahmous/chatbot3: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/spaces/Mahmous/chatbot3/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Mahmous/chatbot3/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Mahmous/chatbot3/resolve/main/Dockerfile
518 Bytes
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy project files | |
| COPY . /app | |
| # Upgrade pip first | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # 🩵 Force reinstall the correct OpenAI SDK and install dependencies | |
| RUN pip uninstall -y openai || true | |
| RUN pip install --no-cache-dir openai==1.12.0 | |
| # Install the rest of the dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose the port (optional but useful for hosting) | |
| EXPOSE 7860 | |
| # Start the Flask API | |
| CMD ["python", "api.py"] | |