MuhammadHafizFassya commited on
Commit
ba17e0a
·
verified ·
1 Parent(s): 6fe3014

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -27
Dockerfile CHANGED
@@ -1,27 +1,25 @@
1
- # Use Python 3.10 as base image
2
- FROM python:3.10-slim
3
-
4
- # Set working directory
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
- git \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Copy requirements and install dependencies
16
- COPY requirements.txt .
17
- RUN pip install --no-cache-dir -r requirements.txt
18
-
19
- # Copy the rest of the application code
20
- COPY . .
21
-
22
- # Expose the port (Hugging Face Spaces uses 7860 by default)
23
- EXPOSE 7860
24
-
25
- # Command to run the application
26
- # We use 0.0.0.0 to bind to all interfaces
27
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use Python 3.10 as base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (Sudah diperbaiki)
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ curl \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements and install dependencies
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy the rest of the application code
19
+ COPY . .
20
+
21
+ # Expose the port (Hugging Face Spaces uses 7860 by default)
22
+ EXPOSE 7860
23
+
24
+ # Command to run the application
25
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]