API-Handler commited on
Commit
8161597
·
verified ·
1 Parent(s): 549d10c

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfille +24 -0
  2. requirements.txt +3 -0
Dockerfille ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as the base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install the required packages
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Download required files
14
+ RUN wget https://huggingface.co/datasets/API-Handler/DDC-Free-API/resolve/main/api_handler.py && \
15
+ wget https://huggingface.co/datasets/API-Handler/DDC-Free-API/resolve/main/main.py
16
+
17
+ # Copy the rest of the application code into the container
18
+ COPY . .
19
+
20
+ # Expose the port that FastAPI will run on
21
+ EXPOSE 7860
22
+
23
+ # Command to run the FastAPI application
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ fastapi==0.95.2
2
+ uvicorn==0.22.0
3
+ requests==2.31.0