mariagrandury commited on
Commit
8b23f41
·
1 Parent(s): e84c073

fix Docker build error

Browse files
Files changed (2) hide show
  1. .dockerignore +13 -0
  2. Dockerfile +34 -0
.dockerignore ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ venv/
2
+ __pycache__/
3
+ .Python
4
+ .cache
5
+ nosetests.xml
6
+ coverage.xml
7
+ *.cover
8
+ *.log
9
+ .git/
10
+ .gitignore
11
+ README.md
12
+ Dockerfile
13
+ .dockerignore
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ git-lfs \
7
+ ffmpeg \
8
+ libsm6 \
9
+ libxext6 \
10
+ cmake \
11
+ rsync \
12
+ libgl1-mesa-dri \
13
+ mesa-utils \
14
+ libglib2.0-0 \
15
+ libxrender1 \
16
+ libgomp1 \
17
+ && rm -rf /var/lib/apt/lists/* \
18
+ && git lfs install
19
+
20
+ # Set working directory
21
+ WORKDIR /home/user/app
22
+
23
+ # Copy requirements and install Python dependencies
24
+ COPY requirements.txt .
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Copy application files
28
+ COPY . .
29
+
30
+ # Expose port
31
+ EXPOSE 7860
32
+
33
+ # Run the application
34
+ CMD ["python", "app.py"]