Spaces:
Running
Running
Disable python buffering
Browse filesBy default, python buffers standard output. This interacts poorly with the Huggingface logs viewer, and often results in standard output not being logged. This commit fixes this problem.
- Dockerfile +3 -0
Dockerfile
CHANGED
@@ -25,4 +25,7 @@ WORKDIR $HOME/app
|
|
25 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
26 |
COPY --chown=user . $HOME/app
|
27 |
|
|
|
|
|
|
|
28 |
CMD ["python", "main.py"]
|
|
|
25 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
26 |
COPY --chown=user . $HOME/app
|
27 |
|
28 |
+
# Disable buffering to allow logging of standard output.
|
29 |
+
ENV PYTHONUNBUFFERED=1
|
30 |
+
|
31 |
CMD ["python", "main.py"]
|