Mudiji commited on
Commit
dffa060
·
verified ·
1 Parent(s): beeb7fc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -34
Dockerfile CHANGED
@@ -1,34 +1,33 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.10-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Install system dependencies
8
- RUN apt-get update && apt-get install -y \
9
- build-essential \
10
- curl \
11
- software-properties-common \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # Copy the requirements file
15
- COPY requirements.txt .
16
-
17
- # Install Python dependencies
18
- RUN pip install --no-cache-dir -r requirements.txt
19
-
20
- # Copy the application files
21
- COPY main.py .
22
-
23
- # Copy the model directory
24
- COPY ../my_final_simplifier_model_v3 ./my_final_simplifier_model_v3
25
-
26
- # Expose the port the app runs on
27
- EXPOSE 7860
28
-
29
- # Set environment variables for Hugging Face Spaces
30
- ENV GRADIO_SERVER_NAME="0.0.0.0"
31
- ENV GRADIO_SERVER_PORT=7860
32
-
33
- # Command to run the application
34
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ curl \
11
+ software-properties-common \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy the requirements file
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy the application files
21
+ COPY main.py .
22
+
23
+
24
+
25
+ # Expose the port the app runs on
26
+ EXPOSE 7860
27
+
28
+ # Set environment variables for Hugging Face Spaces
29
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
30
+ ENV GRADIO_SERVER_PORT=7860
31
+
32
+ # Command to run the application
33
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]