calm-window-49831
07/24/2024, 6:09 PM├── 3rdparty
├── pants.toml
└── docker
├── ci
├── gather
│ ├── BUILD
│ ├── Dockerfile
└── src
├── python
│ ├── gather
│ │ ├── gather_folder1
│ │ ├── gather_folder2
│ │ ├── gather_folder3
│ │ ├── __main__.py
│ │ ├── gather_cli.py
│ │ ├── BUILD
│ │ ├── VERSION
Here is my src/python/gather/BUILD file:
python_sources()
python_distribution(
name = 'gather_dist',
dependencies=[
"src/python/gather:gather",
],
repositories=[
"@gitlab",
],
provides=python_artifact(
name="gather",
version=env("VERSION"),
classifiers=[
"Programming Language :: Python :: 3.11",
]
),
entry_points={
"console_scripts": {"gather": "gather.gather_cli:main"},
},
wheel_config_settings={"--global-option": ["--python-tag", "py311"]},
)
resource(
name="py_typed",
source="py.typed",
)
Here is my docker/gather/BUILD file:
docker_image(
name="gather",
dependencies=["src/python/gather:gather"],
)
I'd like my docker build to take my python distribution and create an entrypoint where it's specified in the BUILD file. I've read through this document and I know that I CAN use a python distribution in my docker build, but I don't know how/what that looks like. From seeing the examples using a PEX binary it seems like given our project so far, we should be able to create a Dockerfile that's just a couple lines. I've seen lots of examples that use a PEX binary but none that use a python distribution.
Any help here would be greatly appreciated!