LogicGoInfotechSpaces commited on
Commit
4d1e6bf
·
1 Parent(s): 1e4ffa5

Add upload directories creation in Dockerfile for better initialization

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -97,10 +97,14 @@ RUN pip install --no-cache-dir --no-build-isolation git+https://github.com/deepi
97
  RUN python -c "import insightface; print('InsightFace installed successfully')" || \
98
  (echo "ERROR: InsightFace verification failed" && exit 1)
99
 
100
- # Copy only essential application files
101
  COPY --chown=user:user api_server.py /app/
102
  COPY --chown=user:user DeepFakeAI/ /app/DeepFakeAI/
103
 
 
 
 
 
104
  # Switch to user
105
  USER user
106
  ENV PATH="/home/user/.local/bin:$PATH"
 
97
  RUN python -c "import insightface; print('InsightFace installed successfully')" || \
98
  (echo "ERROR: InsightFace verification failed" && exit 1)
99
 
100
+ # Copy only essential application files (before switching user)
101
  COPY --chown=user:user api_server.py /app/
102
  COPY --chown=user:user DeepFakeAI/ /app/DeepFakeAI/
103
 
104
+ # Create upload directories with proper permissions
105
+ RUN mkdir -p /app/uploads/source_images /app/uploads/target_videos /app/uploads/result_videos && \
106
+ chown -R user:user /app/uploads
107
+
108
  # Switch to user
109
  USER user
110
  ENV PATH="/home/user/.local/bin:$PATH"