qdqd commited on
Commit
5f639b9
·
verified ·
1 Parent(s): c1b4782

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
9
+
10
+ # Copy the requirements file (if you have one)
11
+ # COPY requirements.txt .
12
+
13
+ # Install any needed packages specified in requirements.txt
14
+ # RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Download the script from the private Hugging Face dataset
17
+ RUN apt-get update && apt-get install -y wget
18
+ RUN wget https://huggingface.co/datasets/qdqd/ddsg-api/resolve/main/api.py -O /app/api.py
19
+
20
+ # Make port 80 available to the world outside this container
21
+ EXPOSE 80
22
+
23
+ # Define environment variable
24
+ ENV FLASK_APP=api.py
25
+
26
+ # Run the Flask application
27
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]