https://pantsbuild.org/ logo
#general
Title
# general
l

lively-exabyte-12840

03/01/2022, 4:31 PM
We have a docker-compose that uses approach #1 in https://blog.pantsbuild.org/pants-pex-and-docker/ of "What you're probably doing today"; i.e. all the Python code for an app is copied to the container, pip install is run there, and then a shell script is run to fire up Flask. I'd like to use Pants's support for building Docker images such that our docker-compose file would just refer to those images (I think). But we also depend on using PyCharm to debug code when it's running in Docker. Does that seem possible still if docker-compose is just running images built by Pants? I am thinking "no" because I don't know how PyCharm's remote interpreter would be able to map local source code to the corresponding code in a running Docker container.
Trying out the Docker image support - perhaps the same OS is required for building the pex as for running it? I get an error like this: pex.environment.ResolveError: A distribution for annoy could not be resolved in this environment.Found 1 distribution for annoy that do not apply: 1.) The wheel tags for annoy 1.16.3 are cp39-cp39-macosx_11_0_x86_64 which do not match the supported tags of DistributionTarget(interpreter=PythonInterpreter('/usr/local/bin/python3.9', PythonIdentity('/usr/local/bin/python3.9', 'cp39', 'cp39', 'manylinux_2_31_x86_64', (3, 9, 10))))
Fiddling with pex_binary/platforms ...
3 Views