Spaces:
Paused
Paused
Download Dockerfile from Hivra/Openai_api: direct link, hf CLI and curl.
- Browser
- Download file 702 Bytes
-
https://huggingface.co/spaces/Hivra/Openai_api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Hivra/Openai_api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Hivra/Openai_api/resolve/main/Dockerfile
702 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install necessary packages | |
| RUN pip install --no-cache-dir flask requests duckduckgo_search openai | |
| # Download the script from the private Hugging Face dataset | |
| RUN apt-get update && apt-get install -y wget | |
| RUN wget https://huggingface.co/datasets/gefiwek187/free-api/resolve/main/app.py -O /app/api.py | |
| RUN pip install duckduckgo_search | |
| # Make port 7860 available to the world outside this container | |
| EXPOSE 7860 | |
| # Define environment variable for Flask | |
| ENV FLASK_APP=api.py | |
| # Run the Flask application on port 7860 | |
| CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"] |