Janeka commited on
Commit
ae93999
·
verified ·
1 Parent(s): bd3315c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -8,7 +8,18 @@ RUN apt-get update && apt-get install -y \
8
  libgl1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
 
11
  # Install Python dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
 
 
 
 
 
 
14
  CMD ["python", "app.py"]
 
8
  libgl1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Configure Numba cache
12
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache
13
+ RUN mkdir -p ${NUMBA_CACHE_DIR} && chmod 777 ${NUMBA_CACHE_DIR}
14
+
15
  # Install Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Create non-root user and set permissions
19
+ RUN useradd -m appuser && \
20
+ chown -R appuser /app && \
21
+ chown -R appuser ${NUMBA_CACHE_DIR}
22
+
23
+ USER appuser
24
+
25
  CMD ["python", "app.py"]