-
Notifications
You must be signed in to change notification settings - Fork 4k
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected
Description
Summary
Streamlit version 0.69.1 fails to start when run inside a Docker container that doesn't have Git installed.
Steps to reproduce
- Create a
Dockerfilewith the following contents:
FROM python:3.8-slim
RUN pip install streamlit
CMD ["streamlit", "hello"]- Build the image:
docker build -t demo .- Run the app:
docker run -it --rm demoExpected behavior:
Streamlit starts without issues.
Actual behavior:
Streamlit fails to start and displays the following error message:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/git/__init__.py", line 83, in <module>
refresh()
File "/usr/local/lib/python3.8/site-packages/git/__init__.py", line 73, in refresh
if not Git.refresh(path=path):
File "/usr/local/lib/python3.8/site-packages/git/cmd.py", line 278, in refresh
raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quietIs this a regression?
yes (worked up until at least version 0.67.1)
Debug info
- Streamlit version:
0.69.1 - Python version:
3.8.6 - Using Conda? PipEnv? PyEnv? Pex? NO
- OS version:
4.19.76-linuxkit
Additional information
This bug can be worked around by setting GIT_PYTHON_REFRESH=quiet environment variable inside the Docker image.
Hveemos
Metadata
Metadata
Assignees
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected