Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
|
@@ -29,5 +29,11 @@ RUN uv pip install --no-cache-dir -r requirements.txt
|
|
| 29 |
# Ensure the correct permissions for hrequests library path
|
| 30 |
RUN chmod -R a+w /usr/local/lib/python3.10/site-packages/hrequests/bin/
|
| 31 |
|
| 32 |
-
#
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Ensure the correct permissions for hrequests library path
|
| 30 |
RUN chmod -R a+w /usr/local/lib/python3.10/site-packages/hrequests/bin/
|
| 31 |
|
| 32 |
+
# Create a startup script
|
| 33 |
+
RUN echo '#!/bin/bash' > /app/start.sh && \
|
| 34 |
+
echo 'source /app/.venv/bin/activate' >> /app/start.sh && \
|
| 35 |
+
echo 'exec uvicorn main:app --host 0.0.0.0 --port 7860' >> /app/start.sh && \
|
| 36 |
+
chmod +x /app/start.sh
|
| 37 |
+
|
| 38 |
+
# Use the startup script to run the application
|
| 39 |
+
CMD ["/app/start.sh"]
|