LoapKit / Dockerfile
Kripton12's picture
Update Dockerfile
1ead1ee verified
raw
history blame contribute delete
692 Bytes
# 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"]