Echo-ai
commited on
Create Dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install necessary packages
|
| 8 |
+
RUN pip install --no-cache-dir flask requests duckduckgo_search openai
|
| 9 |
+
|
| 10 |
+
# Download the script from the private Hugging Face dataset
|
| 11 |
+
RUN apt-get update && apt-get install -y wget
|
| 12 |
+
RUN wget https://huggingface.co/datasets/gefiwek187/free-api/resolve/main/app.py -O /app/api.py
|
| 13 |
+
RUN pip install duckduckgo_search
|
| 14 |
+
|
| 15 |
+
# Make port 7860 available to the world outside this container
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
# Define environment variable for Flask
|
| 19 |
+
ENV FLASK_APP=api.py
|
| 20 |
+
|
| 21 |
+
# Run the Flask application on port 7860
|
| 22 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
|