conda-forge / conda-forge/.github

`PYTHONUNBUFFERED=1` not used in Dockerfile?

Open
#525 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
No language data
Stars
4
Forks
15
PR merge metrics
No merged PRs in 30d

Description

### Comment:

We always try to reference conda-forge code and internal processes when possible. Why reinvent the wheel? 🙂

We noticed the use of `PYTHONDONTWRITEBYTECODE`, but was curious if `PYTHONUNBUFFERED` was also looked at, but in the end was not used for whatever reason?

https://github.com/conda-forge/conda-forge-webservices/blobff4eb46a3ae54b28da199869a4027763ee423287c/Dockerfile#L39

If I understand the use of `PYTHONUNBUFFERED=1` t will help to get the stdout and stderr in realtime instead of when the predefined buffer fills up? This is generally good in a containerized environment so we are seeing logs in realtime?

https://docs.docker.com/guides/python/containerize/#initialize-docker-assets (can be seen under manual)

Contributor guide

Open the contributing guide

Research direction

Start with the conda-forge-webservices Dockerfile at the linked reference, especially line 39 where PYTHONDONTWRITEBYTECODE is configured. Compare the current container logging behavior with Docker’s Python container guidance, then determine whether PYTHONUNBUFFERED=1 should also be set. Done means the decision and resulting Dockerfile change are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.