Update docker file
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
|
@@ -17,25 +17,23 @@ RUN git clone https://github.com/apple/ml-depth-pro.git .
|
|
| 17 |
# Clone YOLO model
|
| 18 |
RUN curl -L https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt -o /app/yolo11s.pt
|
| 19 |
|
| 20 |
-
# Copy
|
| 21 |
COPY . /app
|
| 22 |
-
# Set working directory
|
| 23 |
-
WORKDIR /app
|
| 24 |
|
| 25 |
# Install Python dependencies
|
| 26 |
RUN pip install --upgrade pip
|
| 27 |
RUN pip install -r requirements.txt
|
| 28 |
RUN pip install -e .
|
| 29 |
|
| 30 |
-
#
|
| 31 |
RUN pip install huggingface-hub
|
| 32 |
RUN huggingface-cli download --local-dir checkpoints apple/DepthPro
|
| 33 |
|
| 34 |
-
# Set working directory
|
| 35 |
-
WORKDIR /app
|
| 36 |
-
|
| 37 |
# Set Ultralytics config directory to suppress warnings
|
| 38 |
ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
|
| 39 |
|
| 40 |
-
#
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Clone YOLO model
|
| 18 |
RUN curl -L https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt -o /app/yolo11s.pt
|
| 19 |
|
| 20 |
+
# Copy your actual app code
|
| 21 |
COPY . /app
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
RUN pip install --upgrade pip
|
| 25 |
RUN pip install -r requirements.txt
|
| 26 |
RUN pip install -e .
|
| 27 |
|
| 28 |
+
# Install huggingface CLI and download model
|
| 29 |
RUN pip install huggingface-hub
|
| 30 |
RUN huggingface-cli download --local-dir checkpoints apple/DepthPro
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
# Set Ultralytics config directory to suppress warnings
|
| 33 |
ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
|
| 34 |
|
| 35 |
+
# Expose the Hugging Face expected port
|
| 36 |
+
EXPOSE 7860
|
| 37 |
+
|
| 38 |
+
# Start FastAPI with Uvicorn
|
| 39 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|