Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
# Base image using Python 3.9
|
2 |
FROM python:3.9
|
3 |
|
|
|
|
|
|
|
4 |
# Create a new user to run the app
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
@@ -22,4 +25,4 @@ COPY --chown=user . /app
|
|
22 |
EXPOSE 7860
|
23 |
|
24 |
# Command to run the FastAPI app using uvicorn
|
25 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
# Base image using Python 3.9
|
2 |
FROM python:3.9
|
3 |
|
4 |
+
# Install system dependencies needed by OpenCV and other libraries
|
5 |
+
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
6 |
+
|
7 |
# Create a new user to run the app
|
8 |
RUN useradd -m -u 1000 user
|
9 |
USER user
|
|
|
25 |
EXPOSE 7860
|
26 |
|
27 |
# Command to run the FastAPI app using uvicorn
|
28 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|