API-Handler commited on
Commit
6566b74
·
verified ·
1 Parent(s): 77da455

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -23
Dockerfile CHANGED
@@ -1,24 +1,27 @@
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"]
 
1
+ # Use an official Python runtime as the base image
2
+ FROM python:3.9-slim
3
+
4
+ # Install wget
5
+ RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
6
+
7
+ # Set the working directory in the container
8
+ WORKDIR /app
9
+
10
+ # Copy the requirements file into the container
11
+ COPY requirements.txt .
12
+
13
+ # Install the required packages
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Download required files
17
+ RUN wget https://huggingface.co/datasets/API-Handler/DDC-Free-API/resolve/main/api_handler.py && \
18
+ wget https://huggingface.co/datasets/API-Handler/DDC-Free-API/resolve/main/main.py
19
+
20
+ # Copy the rest of the application code into the container
21
+ COPY . .
22
+
23
+ # Expose the port that FastAPI will run on
24
+ EXPOSE 7860
25
+
26
+ # Command to run the FastAPI application
27
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]