Zhu-FaceOnLive's picture
Update Dockerfile
1a69f6c verified
raw
history blame contribute delete
970 Bytes
FROM ubuntu:22.04
RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone
RUN apt-get update && \
apt-get install -y binutils python3 python3-pip python3-opencv && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./idlivesdk.py .
COPY --chown=user ./app.py .
COPY --chown=user ./demo.py .
COPY --chown=user ./requirements.txt .
COPY --chown=user ./run.sh .
COPY --chown=user ./examples ./examples
COPY --chown=user ./lib /usr/lib
COPY --chown=user ./lib/libidlivesdk.so ./lib/libidlivesdk.so
ADD --chown=user https://huggingface.co/datasets/FaceOnLive/IDL-Models/resolve/main/model.tar.gz .
RUN tar -xvzf ./model.tar.gz -C . && rm ./model.tar.gz
RUN chmod -R 777 ./model/
RUN pip3 install -r requirements.txt
RUN chmod a+x run.sh
CMD (cd /app && exec python3 app.py & sleep 10 && exec python3 demo.py)
EXPOSE 7860