Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
@@ -33,9 +33,13 @@ RUN mkdir -p /app/{weights,imgs} && \
|
|
33 |
chmod -R 777 /app
|
34 |
|
35 |
# Application code
|
36 |
-
COPY main.py utils.py download_models.py ./
|
37 |
-
COPY util ./util
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
RUN python3 download_models.py
|
40 |
|
41 |
# Set up user
|
@@ -43,4 +47,5 @@ RUN useradd -m -u 1000 user
|
|
43 |
USER user
|
44 |
ENV PATH="/home/user/.local/bin:$PATH"
|
45 |
|
46 |
-
|
|
|
|
33 |
chmod -R 777 /app
|
34 |
|
35 |
# Application code
|
36 |
+
COPY main.py utils.py download_models.py ./ # Copy your app code
|
37 |
+
COPY util ./util # Copy the util folder
|
38 |
+
|
39 |
+
# Ensure weights folder is also copied
|
40 |
+
COPY weights /app/weights # Ensure the weights folder with models is copied
|
41 |
+
|
42 |
+
# Download models if needed
|
43 |
RUN python3 download_models.py
|
44 |
|
45 |
# Set up user
|
|
|
47 |
USER user
|
48 |
ENV PATH="/home/user/.local/bin:$PATH"
|
49 |
|
50 |
+
# Set the entry point to run the app
|
51 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|