gahanmakwana commited on
Commit
4fdab3c
·
1 Parent(s): b1f386d

change docker

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -13
Dockerfile CHANGED
@@ -1,25 +1,28 @@
1
- # 1. Use a slim Python image
2
  FROM python:3.9-slim
3
 
4
- # 2. Install OS-level deps (including setuptools) that PaddleOCR and OpenCV need
5
- RUN apt-get update && \
6
- apt-get install -y --no-install-recommends \
7
- build-essential \
8
- libglib2.0-0 libsm6 libxrender1 libxext6 \
9
- python3-setuptools \
10
- && rm -rf /var/lib/apt/lists/*
 
 
 
11
 
12
  WORKDIR /app
13
 
14
- # 3. Copy & install Python deps without pip cache
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # 4. Copy your whole app
19
  COPY . .
20
 
21
- # 5. Tell the container to listen on $PORT
22
- ENV PORT 8080
23
 
24
- # 6. Start via Gunicorn
25
  CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]
 
1
+ # Use a slim Python image
2
  FROM python:3.9-slim
3
 
4
+ # Install OS-level dependencies
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ build-essential \
7
+ libglib2.0-0 \
8
+ libsm6 \
9
+ libxrender1 \
10
+ libxext6 \
11
+ libgl1 \
12
+ python3-setuptools \
13
+ && rm -rf /var/lib/apt/lists/*
14
 
15
  WORKDIR /app
16
 
17
+ # Copy and install dependencies
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy the rest of the app
22
  COPY . .
23
 
24
+ # Set environment port (Railway uses it)
25
+ ENV PORT=8080
26
 
27
+ # Start the app
28
  CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]