mike23415 commited on
Commit
155942f
·
verified ·
1 Parent(s): b8307ac

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -1,26 +1,21 @@
1
- # Use a Python base image
2
  FROM python:3.9-slim
3
 
4
- # Install system dependencies required by rembg and OpenCV
5
  RUN apt-get update && apt-get install -y \
6
  libgl1 \
7
  libglib2.0-0 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Set working directory
11
  WORKDIR /app
12
 
13
- # Copy requirements first to leverage Docker cache
14
- COPY requirements.txt .
 
15
 
16
- # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Copy the rest of the application
20
  COPY app.py .
21
 
22
- # Expose the port the app runs on
23
  EXPOSE 5000
24
-
25
- # Command to run the application
26
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "120", "app:app"]
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  libgl1 \
6
  libglib2.0-0 \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  WORKDIR /app
10
 
11
+ # Set environment variables for Numba
12
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache \
13
+ NUMBA_DISABLE_CACHE=1
14
 
15
+ COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
18
  COPY app.py .
19
 
 
20
  EXPOSE 5000
 
 
21
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "120", "app:app"]