Spaces:
Running
Running
File size: 619 Bytes
39b5ef2 | 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 31 32 33 34 | FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy all services
COPY . .
# Install dependencies from root requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Create non-root user (good practice for HF Spaces)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /app
# Ensure start script is executable
USER root
RUN chmod +x start.sh
USER user
# Default Port for Hugging Face Spaces
EXPOSE 7860
# Start script
CMD ["./start.sh"]
|