Spaces:
Sleeping
Sleeping
Commit ·
b2dd551
1
Parent(s): d72015d
changes in deployment
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -2,13 +2,16 @@ FROM python:3.10
|
|
| 2 |
|
| 3 |
WORKDIR /code
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY ./requirements.txt /code/requirements.txt
|
| 6 |
|
| 7 |
-
# Install the dependencies
|
| 8 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 9 |
|
| 10 |
# Copy your main.py file into the container
|
| 11 |
COPY . .
|
| 12 |
|
| 13 |
-
# Run the FastAPI server on port 7860
|
| 14 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
+
# Install system dependencies required by OpenCV and Ultralytics
|
| 6 |
+
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
|
| 7 |
+
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
+
# Install the Python dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
# Copy your main.py file into the container
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Run the FastAPI server on port 7860
|
| 17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|