moderation / Dockerfile
Kiran5's picture
Add application file
805722f
raw
history blame
617 Bytes
FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
COPY --chown=user ./lib/aicloudlibs-0.1.0-py3-none-any.whl /app/lib/
COPY ./lib/en_core_web_lg-3.7.1-py3-none-any.whl /app/lib/
COPY --chown=user . /app
RUN ls /app/lib/en_core_web_lg-3.7.1-py3-none-any.whl
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Expose the port (default for Hugging Face is 7860)
EXPOSE 7860
# CMD to run the FastAPI app with Uvicorn
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]