Spaces:
Runtime error
Runtime error
File size: 606 Bytes
ef06b39 4e8a148 d391afc 4e8a148 ef06b39 4e8a148 ef06b39 4e8a148 d391afc 4e8a148 ef06b39 4e8a148 d391afc 4e8a148 | 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 26 27 28 29 30 | FROM python:3.11-slim
# Install all dependencies (build + runtime)
RUN apt-get update && apt-get install -y \
git cmake clang build-essential curl libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -ms /bin/bash user
WORKDIR /home/user/app
# Install Python deps first (cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY app.py start.sh ./
RUN chmod +x start.sh
RUN chown -R user:user /home/user/app
USER user
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT="7860"
CMD ["./start.sh"]
|