Spaces:
Runtime error
Runtime error
File size: 556 Bytes
b235c14 89ec0dc b235c14 ae93999 89ec0dc b235c14 ae93999 bd3315c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
FROM python:3.9-slim
WORKDIR /app
COPY . .
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Configure Numba cache
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
RUN mkdir -p ${NUMBA_CACHE_DIR} && chmod 777 ${NUMBA_CACHE_DIR}
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create non-root user and set permissions
RUN useradd -m appuser && \
chown -R appuser /app && \
chown -R appuser ${NUMBA_CACHE_DIR}
USER appuser
CMD ["python", "app.py"] |