Spaces:
Sleeping
Sleeping
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 /lib/ | |
COPY --chown=user ./lib/better_profanity-2.0.0-py3-none-any.whl /lib/ | |
COPY --chown=user ./lib/privacy-1.0.9-py3-none-any.whl /lib/ | |
RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
COPY --chown=user . /app | |
# 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"] | |