File size: 692 Bytes
0a479a3 7f915b9 0a479a3 1ead1ee 0a479a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Use an official Python runtime as a parent image
FROM python:3.10-slim-buster
ENV PYTHONDONTWRITEBYTECODE="1"
ENV PYTHONUNBUFFERED="1"
ENV PORT="8888"
# Set the working directory in the container to /app
WORKDIR /app
RUN useradd -m AppUser
RUN chown -R AppUser:AppUser /app
ENV PATH="/home/AppUser/.local/bin:$PATH"
USER AppUser
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir mediaflow-proxy
# Expose the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
EXPOSE 8888
# Run run.py when the container launches
CMD ["uvicorn", "mediaflow_proxy.main:app", "--host", "0.0.0.0", "--port", "8888", "--workers", "4"] |