File size: 800 Bytes
5f639b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763a879
5f639b9
 
 
 
 
763a879
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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

# Copy the requirements file (if you have one)
# COPY requirements.txt .

# Install any needed packages specified in requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt

# Download the script from the private Hugging Face dataset
RUN apt-get update && apt-get install -y wget
RUN wget https://huggingface.co/datasets/qdqd/ddsg-api/resolve/main/api.py -O /app/api.py

# Make port 80 available to the world outside this container
EXPOSE 7860

# Define environment variable
ENV FLASK_APP=api.py

# Run the Flask application
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]