|
FROM python:3.10 |
|
|
|
|
|
RUN apt-get update && apt-get install -y wget gnupg2 |
|
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - |
|
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list |
|
RUN apt-get update && apt-get install -y google-chrome-stable |
|
|
|
WORKDIR /code |
|
|
|
COPY ./requirements.txt /code/requirements.txt |
|
|
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
USER user |
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
RUN mkdir -p /home/user/app/cv_files/ && \ |
|
curl -L https://huggingface.co/datasets/Kyo-Kai/Fsg_pp_files/resolve/main/AniClassifier.pt?download=true -o /home/user/app/cv_files/AniClassifier.pt && \ |
|
curl -L https://huggingface.co/datasets/Kyo-Kai/Fsg_pp_files/resolve/main/AniFaceDet.pt?download=true -o /home/user/app/cv_files/AniFaceDet.pt |
|
|
|
|
|
RUN chmod +x $HOME/app/driver/chromedriver |
|
|
|
|
|
CMD ["uvicorn", "Fsg_pp:app", "--host", "0.0.0.0", "--port", "7860"] |