Update Dockerfile
Browse files- Dockerfile +20 -45
Dockerfile
CHANGED
|
@@ -1,57 +1,32 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
# # Set the timezone of the container
|
| 4 |
-
# ENV CONTAINER_TIMEZONE=UTC
|
| 5 |
-
# RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone
|
| 6 |
-
|
| 7 |
-
# # Create directory for the application
|
| 8 |
-
# RUN mkdir -p /home/recognito_id
|
| 9 |
-
|
| 10 |
-
# # Set the working directory
|
| 11 |
-
# WORKDIR /home/recognito_id
|
| 12 |
-
|
| 13 |
-
# # Copy the application files into the container
|
| 14 |
-
# COPY . .
|
| 15 |
-
|
| 16 |
-
# ADD https://huggingface.co/recognito/ID-Document-Liveness-Detection-Models/resolve/main/model.zip .
|
| 17 |
-
|
| 18 |
-
# # Make the scripts executable
|
| 19 |
-
# RUN chmod +x install.sh run_demo.sh
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
# RUN ./install.sh
|
| 25 |
|
| 26 |
-
#
|
|
|
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
| 35 |
-
RUN
|
| 36 |
-
RUN apt-get update && \
|
| 37 |
-
apt-get install -y binutils python3 python3-pip python3-opencv && \
|
| 38 |
-
rm -rf /var/lib/apt/lists/*
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
-
ADD --chown=user https://huggingface.co/recognito/ID-Document-Liveness-Detection-Models/resolve/main/model.tar.xz .
|
| 49 |
-
RUN tar -xvJf ./model.tar.xz -C ./id_live/engine/ && rm ./model.tar.xz
|
| 50 |
RUN chmod -R 777 .
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
EXPOSE 9000 7860
|
| 55 |
|
|
|
|
| 56 |
ENTRYPOINT ["./run_demo.sh"]
|
| 57 |
-
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# Set the timezone of the container
|
| 4 |
+
ENV CONTAINER_TIMEZONE=UTC
|
| 5 |
+
RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone
|
|
|
|
| 6 |
|
| 7 |
+
# Create directory for the application
|
| 8 |
+
RUN mkdir -p /home/recognito_id
|
| 9 |
|
| 10 |
+
# Set the working directory
|
| 11 |
+
WORKDIR /home/recognito_id
|
| 12 |
|
| 13 |
+
# Copy the application files into the container
|
| 14 |
+
COPY . .
|
| 15 |
|
| 16 |
+
ADD https://huggingface.co/recognito/ID-Document-Liveness-Detection-Models/resolve/main/model.tar.xz .
|
| 17 |
+
RUN tar -xvJf ./model.tar.xz -C ./id_live/engine/ && rm ./model.tar.xz
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
# Make the scripts executable
|
| 20 |
+
RUN chmod +x install.sh run_demo.sh
|
|
|
|
| 21 |
|
| 22 |
+
# Run the install.sh script to perform any installation tasks
|
| 23 |
+
RUN apt-get update && apt-get install -y sudo
|
| 24 |
+
RUN ./install.sh
|
| 25 |
|
|
|
|
|
|
|
| 26 |
RUN chmod -R 777 .
|
| 27 |
|
| 28 |
+
# Expose port 8000(flask), 7860(gradio)
|
| 29 |
+
EXPOSE 8000 7860
|
|
|
|
| 30 |
|
| 31 |
+
# Set the default command to run the application
|
| 32 |
ENTRYPOINT ["./run_demo.sh"]
|
|
|