Spaces:
Runtime error
Runtime error
Commit
·
d0af789
1
Parent(s):
1f1ffb5
Update Dockerfile to enable Python unbuffered mode and adjust entrypoint and CMD configurations
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -4,6 +4,8 @@ FROM python:3.12-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
| 7 |
# Install system dependencies required for sentence-transformers and OpenCV
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
libgl1 \
|
|
@@ -27,15 +29,15 @@ RUN chmod +x entrypoint.sh
|
|
| 27 |
EXPOSE 8000
|
| 28 |
|
| 29 |
# Run the entrypoint script when the container launches
|
| 30 |
-
ENTRYPOINT ["./entrypoint.sh"]
|
| 31 |
|
| 32 |
# Make port 8000 available to the world outside this container
|
| 33 |
# EXPOSE 8000
|
| 34 |
|
| 35 |
# Define environment variable
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
# Run app.py when the container launches
|
| 40 |
# CMD ["chainlit", "run", "app.py"]
|
| 41 |
-
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
ENV PYTHONUNBUFFERED=1
|
| 8 |
+
|
| 9 |
# Install system dependencies required for sentence-transformers and OpenCV
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
libgl1 \
|
|
|
|
| 29 |
EXPOSE 8000
|
| 30 |
|
| 31 |
# Run the entrypoint script when the container launches
|
| 32 |
+
# ENTRYPOINT ["./entrypoint.sh"]
|
| 33 |
|
| 34 |
# Make port 8000 available to the world outside this container
|
| 35 |
# EXPOSE 8000
|
| 36 |
|
| 37 |
# Define environment variable
|
| 38 |
+
ENV CHAINLIT_HOST=0.0.0.0
|
| 39 |
+
ENV CHAINLIT_PORT=8000
|
| 40 |
|
| 41 |
# Run app.py when the container launches
|
| 42 |
# CMD ["chainlit", "run", "app.py"]
|
| 43 |
+
CMD ["sh", "-c", "chainlit run app.py --host 0.0.0.0 --port ${PORT:-8000} --headless"]
|