EmTpro01 commited on
Commit
ae02d1a
·
verified ·
1 Parent(s): da5a160

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -28
Dockerfile CHANGED
@@ -1,28 +1,21 @@
1
- # Use Python 3.10 slim image as base
2
- FROM python:3.10-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Install system dependencies required for numpy and scipy
8
- RUN apt-get update && apt-get install -y \
9
- build-essential \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- # Copy requirements first to leverage Docker cache
13
- COPY requirements.txt .
14
-
15
- # Install Python dependencies
16
- RUN pip install --no-cache-dir -r requirements.txt
17
-
18
- # Copy the server application
19
- COPY . .
20
-
21
- # Copy frontend files to a static directory
22
- COPY ../frontend ./static
23
-
24
- # Expose port 7860 (HuggingFace Spaces default port)
25
- EXPOSE 7860
26
-
27
- # Command to run the application
28
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy requirements and install dependencies
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy application files
15
+ COPY . .
16
+
17
+ # Expose port
18
+ EXPOSE 7860
19
+
20
+ # Start the application
21
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]