my-emotion-api / Dockerfile
A7md47's picture
Upload 3 files
7aee5ff verified
Raw
History Blame Contribute Delete
394 Bytes
FROM python:3.9
# Set up a new user named "user" with user id 1000
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:${PATH}"
WORKDIR /app
COPY --chown=user . /app
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
# Start the FastAPI app on port 7860 (Hugging Face default)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]