breezy-apple-27122
02/28/2023, 8:48 AMpoetry_requirements(
name="poetry",
module_mapping={
"python-box": ["box"],
"azure-storage-file-datalake": ["azure.storage.filedatalake.DataLakeServiceClient"]
}
)
local_environment(
name="local_linux",
compatible_platforms=["linux_x86_64"],
fallback_environment="docker_linux",
)
docker_environment(
name="docker_linux",
platform="linux_x86_64",
image="python:3.11-slim",
python_bootstrap_search_path=["<PATH>"]
)
src/streamlit/template/BUILD:
python_sources()
pex_binary(
name="bin",
script="streamlit",
dependencies=["./main.py", "//:poetry#watchdog"],
environment="docker_linux"
)
docker_image(name="docker")
src/streamlit/template/Dockerfile:
FROM python:3.11-slim
COPY src.streamlit.template/bin.pex /bin/streamlit
CMD /bin/streamlit
src/streamlit/template/main.py:
import streamlit as st
st.title("My Streamlit App")
st.text("Hello, world!")
st.balloons()
root pants.toml:
[GLOBAL]
pants_version = "2.15.0"
backend_packages = [
"pants.backend.python",
"pants.backend.docker"
]
[anonymous-telemetry]
enabled = false
[python]
tailor_pex_binary_targets = false
interpreter_constraints = ["CPython==3.11.2"]
enable_resolves = true
[python-bootstrap]
search_path = ["<PYENV>"]
[docker]
env_vars = ["DOCKER_CONFIG=%(homedir)s/.docker"]
default_repository = "{parent_directory}/{directory}"
[environments-preview.names]
docker_linux = "//:docker_linux"
local_linux = "//:local_linux"
Shell command: pants run src/streamlit/template:docker
Error Output:
09:41:51.03 [INFO] Completed: Building docker image streamlit/template:latest
Failed to find compatible interpreter on path /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.
Examined the following interpreters:
1.) /usr/local/bin/python3.11 CPython==3.11.2
No interpreter compatible with the requested constraints was found:
Failed to resolve requirements from PEX environment @ /root/.pex/unzipped_pexes/c411c8338ca0b0531952668a33219de7ba52349e.
Needed cp311-cp311-manylinux_2_31_aarch64 compatible dependencies for:
1: MarkupSafe>=2.0
Required by:
Jinja2 3.1.2
But this pex had no ProjectName(raw='MarkupSafe', normalized='markupsafe') distributions.
2: numpy
Required by:
altair 4.2.2
streamlit 1.19.0
But this pex had no ProjectName(raw='numpy', normalized='numpy') distributions.
3: pandas>=0.18
Required by:
altair 4.2.2
But this pex had no ProjectName(raw='pandas', normalized='pandas') distributions.
4: pandas>=0.25
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pandas', normalized='pandas') distributions.
5: pillow>=6.2.0
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pillow', normalized='pillow') distributions.
6: pyarrow>=4.0
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pyarrow', normalized='pyarrow') distributions.
7: charset-normalizer<4,>=2
Required by:
requests 2.28.2
But this pex had no ProjectName(raw='charset-normalizer', normalized='charset-normalizer') distributions.
8: numpy>=1.16.4
Required by:
pydeck 0.8.0
But this pex had no ProjectName(raw='numpy', normalized='numpy') distributions.
9: tornado>=6.0.3
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='tornado', normalized='tornado') distributions.
10: watchdog; platform_system != "Darwin"
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='watchdog', normalized='watchdog') distributions.
11: watchdog==2.3.0
But this pex had no ProjectName(raw='watchdog', normalized='watchdog') distributions.
FROM --platform="linux/amd64" python:3.11-slim
Learning by failing...refined-addition-53644
02/28/2023, 9:43 AMplatform="linux_x86_64"
to the docker_environment
.
Maybe a bug?breezy-apple-27122
02/28/2023, 11:29 AM