Spaces:
Runtime error

AgentApi / Dockerfile
amineelh's picture
Update Dockerfile
4d2726b verified
Raw History Blame Contribute Delete
498 Bytes
# Base image
FROM python:3.12.9
# Create a non-root user and switch to it
RUN useradd -m -u 1000 user
USER user
# Set environment path
ENV PATH="/home/user/.local/bin:$PATH"
# Working directory
WORKDIR /app
# Install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the entire app
COPY --chown=user . /app
# Launch the app (adjusted path!)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]