LogicGoInfotechSpaces commited on
Commit
cb72782
·
1 Parent(s): 29cc6b6

fix: use COPY --chown to avoid chown failure and update .dockerignore

Browse files
Files changed (2) hide show
  1. .dockerignore +21 -0
  2. Dockerfile +3 -4
.dockerignore CHANGED
@@ -1,7 +1,9 @@
1
  # Exclude unnecessary files from Docker build
2
  .git
3
  .gitignore
 
4
  __pycache__
 
5
  *.pyc
6
  *.pyo
7
  *.pyd
@@ -23,11 +25,30 @@ htmlcov/
23
  *.jpg
24
  *.png
25
  *.jpeg
 
 
26
  uploads/
27
  *.db
28
  *.sqlite
 
 
 
 
29
  .vscode/
30
  .idea/
31
  *.swp
32
  *.swo
33
  *~
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Exclude unnecessary files from Docker build
2
  .git
3
  .gitignore
4
+ .gitattributes
5
  __pycache__
6
+ **/__pycache__
7
  *.pyc
8
  *.pyo
9
  *.pyd
 
25
  *.jpg
26
  *.png
27
  *.jpeg
28
+ *.gif
29
+ *.webp
30
  uploads/
31
  *.db
32
  *.sqlite
33
+ *.pth
34
+ tests/
35
+ *.md
36
+ docker-compose.yml
37
  .vscode/
38
  .idea/
39
  *.swp
40
  *.swo
41
  *~
42
+ app.py
43
+ app2.py
44
+ app3.py
45
+ del.py
46
+ run.py
47
+ apt.txt
48
+ requirements2.txt
49
+ requirements-ci.txt
50
+ mypy.ini
51
+ api/COLLECTIONS_INDEX.md
52
+ api/Face_Swap_Video_API.postman_collection.json
53
+ api/README.md
54
+ gfpgan/weights/*.pth
Dockerfile CHANGED
@@ -24,12 +24,11 @@ COPY requirements.txt requirements.txt
24
  RUN pip install --no-cache-dir --upgrade pip && \
25
  pip install --no-cache-dir -r requirements.txt
26
 
27
- # Copy application code
28
- COPY . /app
29
 
30
- # Create upload directories and set ownership
31
  RUN mkdir -p uploads/source_images uploads/target_videos uploads/result_videos uploads/output && \
32
- chown -R user:user /app && \
33
  chmod -R 755 uploads
34
 
35
  # Switch to user
 
24
  RUN pip install --no-cache-dir --upgrade pip && \
25
  pip install --no-cache-dir -r requirements.txt
26
 
27
+ # Copy application code with ownership
28
+ COPY --chown=user:user . /app
29
 
30
+ # Create upload directories
31
  RUN mkdir -p uploads/source_images uploads/target_videos uploads/result_videos uploads/output && \
 
32
  chmod -R 755 uploads
33
 
34
  # Switch to user