Spaces:
Build error
Build error
Dockerizado
Browse files- Dockerfile +25 -0
- docker-compose.yml +11 -0
- requirements.txt +3 -2
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
# Set the working directory in the container
|
4 |
+
WORKDIR /app
|
5 |
+
|
6 |
+
# Install cmake, libGL, and other necessary build tools
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
cmake \
|
9 |
+
build-essential \
|
10 |
+
libgl1-mesa-glx \
|
11 |
+
&& rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Copy the dependencies file to the working directory
|
14 |
+
COPY requirements.txt requirements.txt
|
15 |
+
|
16 |
+
# Install any dependencies
|
17 |
+
RUN pip install --upgrade pip
|
18 |
+
RUN pip install -r requirements.txt
|
19 |
+
|
20 |
+
# Copy the content of the local src directory to the working directory
|
21 |
+
COPY . .
|
22 |
+
|
23 |
+
# Specify the command to run on container start
|
24 |
+
CMD ["streamlit", "run", "app.py"]
|
25 |
+
|
docker-compose.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3.8'
|
2 |
+
|
3 |
+
services:
|
4 |
+
face_recognition_app:
|
5 |
+
build: .
|
6 |
+
ports:
|
7 |
+
- "8501:8501"
|
8 |
+
volumes:
|
9 |
+
- .:/app
|
10 |
+
environment:
|
11 |
+
- PYTHONUNBUFFERED=1
|
requirements.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
streamlit
|
2 |
face_recognition
|
3 |
-
opencv-python
|
4 |
numpy
|
5 |
-
|
|
|
|
1 |
streamlit
|
2 |
face_recognition
|
3 |
+
opencv-python-headless
|
4 |
numpy
|
5 |
+
Pillow
|
6 |
+
dlib
|