Yermek68 commited on
Commit
84e536c
·
verified ·
1 Parent(s): df5461a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -7
Dockerfile CHANGED
@@ -1,17 +1,29 @@
1
  # === Base Image ===
2
  FROM python:3.10-slim
3
 
 
4
  WORKDIR /app
5
 
6
- # === Install dependencies efficiently ===
 
 
 
 
 
 
 
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt && \
9
- rm -rf /root/.cache/pip && \
10
- apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
11
 
12
- # === Copy Core App ===
13
- COPY app.py .
14
 
15
- # === Launch App ===
16
  EXPOSE 7860
17
- CMD ["python", "app.py"]
 
 
 
1
  # === 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 --no-install-recommends \
9
+ build-essential \
10
+ git \
11
+ curl \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # === Copy dependency list and install ===
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt && \
17
+ rm -rf /root/.cache/pip
18
+
19
+ # === Copy application files ===
20
+ COPY . .
21
 
22
+ # === Make entrypoint executable ===
23
+ RUN chmod +x entrypoint.sh
24
 
25
+ # === Expose app port ===
26
  EXPOSE 7860
27
+
28
+ # === Use custom entrypoint ===
29
+ ENTRYPOINT ["./entrypoint.sh"]