LifeGuide / Dockerfile
Shouvik599
added feature improvements
7ae27cd
raw
history blame contribute delete
569 Bytes
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create a non-root user for HF compliance
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory to user's home
WORKDIR $HOME/app
# Copy application code and set ownership to our user
COPY --chown=user . $HOME/app
# Ensure the start script is executable
RUN chmod +x start.sh
# HF Spaces requires port 7860
EXPOSE 7860
CMD ["./start.sh"]