bravo24 commited on
Commit
ac39b7c
·
verified ·
1 Parent(s): a91ae21

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -0
Dockerfile CHANGED
@@ -28,11 +28,16 @@ RUN pip install --no-cache-dir --upgrade pip && \
28
  pip install --no-cache-dir numpy==1.26.4 && \
29
  pip install --no-cache-dir -r requirements.txt
30
 
 
 
31
  # 5. Dosyaları Kopyala ve Yetkilendir
32
  COPY --chown=user . .
 
33
 
34
  USER user
35
  ENV PATH="/home/user/.local/bin:${PATH}"
36
 
 
 
37
  EXPOSE 7860
38
  CMD ["python", "app.py"]
 
28
  pip install --no-cache-dir numpy==1.26.4 && \
29
  pip install --no-cache-dir -r requirements.txt
30
 
31
+ RUN python3 -c "from ultralytics import YOLO; YOLO('yolov8n.pt')"
32
+
33
  # 5. Dosyaları Kopyala ve Yetkilendir
34
  COPY --chown=user . .
35
+ RUN chown -R user:user /app
36
 
37
  USER user
38
  ENV PATH="/home/user/.local/bin:${PATH}"
39
 
40
+ ENV YOLO_CONFIG_DIR="/tmp/Ultralytics"
41
+
42
  EXPOSE 7860
43
  CMD ["python", "app.py"]