lively-gpu-26436
04/27/2023, 5:19 PMdocker_image
target? I’m building an image that I later reference in a docker_environment
matching that platform value.limited-petabyte-77054
04/27/2023, 5:21 PMdocker_image
instructions and I can run them using run container
command.
Now, I want to add some integration tests which only pass if container is running to attend requests generated in python_test sections. How I can start a docker_container
before running python_tests
? Thx!ripe-gigabyte-88964
04/27/2023, 6:27 PMVIRTUAL_ENV
environment variable is set and also that the PATH
is inheriting from my terminal. Is there a way I can easily include the VIRTUAL_ENV
path in my PATH
variable or do I need to manually export the venv first?swift-river-73520
04/27/2023, 7:43 PMpants
I get the same error:
Exception message: Could not initialize store for cache: "Error making env for store at \"/Users/zach/.cache/pants/lmdb_store/cache/8\": No space left on device"
I tried deleting everything in /Users/zach/.cache/pants
, deleted everything in my docker cache (don't think this would matter), restarted my computer. tried checking out a new copy of the repo I was working on. I also tried creating a new project with a minimal pants.toml setup, same error. short of reformatting my computer I'm really not sure what else to try.breezy-mouse-20493
04/27/2023, 10:38 PMpants test path/to/test/my_test.py
which depends on a directory of data files. These data files are in the same directory, so I suppose these become a target
. I think I can add these files like so in the BUILD file that lives inside the test
directory:
python_tests(
name="tests",
dependencies=[":mydata"]
)
python_tests(
name="tests0",
files(
name="mydata",
sources=["test-data/*"]
)
So far so good?
🧵
Edit: The issue was that there were two python_tests
targets. Not sure how this happened. Maybe a pants tailor ::
coupled with an overzealous read of the docs. I'm new to Pants. 😁wide-midnight-78598
04/28/2023, 1:40 AMcold-vr-15232
04/28/2023, 8:44 AMfamous-xylophone-36532
04/28/2023, 9:10 AM./pants fmt
:
AssertionError: Expected ('src/cicd/mutate.py',) to match ('src/cicd/./mutate.py',)
cold-vr-15232
04/28/2023, 11:07 AMhundreds-carpet-28072
04/28/2023, 2:34 PMdocker_environment
? Getting various errors when trying to do so and assuming I’m missing some config somewhere.curved-manchester-66006
04/28/2023, 4:35 PMpants.pantsd.process_manager.ProcessManager.Timeout: exceeded timeout of 60 seconds while waiting for pantsd to start
). Does anyone have any best practices or examples for running pants from within a vscode DevContainer? (I use neither Macs nor vscode nor arm, so there is a lot of otherwise obvious context I'm probably missing.)rich-london-74860
04/28/2023, 4:56 PM./pants test --test-debug --change-since=main --changed-dependees=transitive
into ./pants test-delta-debug
?cold-soccer-63228
04/28/2023, 7:52 PM./pants --changed-since=origin/master dependees
. The error I’m seeing is the following.
AttributeError: type object 'PythonSourceField' has no attribute 'is_applicable'
Happy to provide code snippets or other additional detailssilly-queen-7197
04/28/2023, 9:24 PM./pants list --filter-target-type=pex_binary ::
gives me
foo:cli
Can I look at all the commits that contain modifications to (transitive) dependencies of foo:cli
and then get the latest one (on a given branch).
I'm interested in this because I want to be able to answer the question is the latest version of foo:cli
deployed.
Maybe an unrelated question. If I wrap everything into a helm chart and use [helm-deployments](https://www.pantsbuild.org/docs/helm-deployments) is the deployment a no-op if none of the dependencies have changed?breezy-mouse-20493
04/29/2023, 2:46 AMshell_command
. I have a python project, with python tests, and inside the BUILD file for said tests I've added
python_tests(...)
shell_command(
command="./just_run_touch_foo.sh",
tools=["bash", "touch"],
execution_dependencies=[":scripts"],
output_directories=["."],
workdir=".",
description="this just runs `touch foo"
)
shell_sources(
name="scripts"
)
What should I expect to happen here? Hoping to see a file foo
sitting in the directory after the tests run. (Or, at least, inside the sandbox while tests run. So far I have seen neither.)
At the current time, my attempt at running the shell command above results in
19:40:00.77 [WARN] No applicable files or targets matched. The `test` goal works with these target types:
* experimental_test_shell_command
* python_test
* shunit2_test
However, you only specified target arguments with these target types:
* shell_command
I'm pretty sure I don't want to run experimental_test_shell_command
, as this actually runs a test inside bash script. What I want eventually is to download some canonical dataset that will be used in my unit tests...gorgeous-eve-12553
04/29/2023, 2:50 PMsparse-intern-12190
04/30/2023, 3:30 PMrefined-hydrogen-47967
05/01/2023, 9:36 AMflat-zoo-31952
05/01/2023, 7:09 PMstraight-alligator-54644
05/01/2023, 7:10 PMrun_against_entire_lockfile = true
to the pants.toml
, it seems like pants run <myfile.py>
ends up opening an InteractiveConsole instead of running the python file. If I set to false, then using pants run does run the binary.
I can repro this on the https://github.com/pantsbuild/example-python repo, by adding the above and then trying to run pants run helloworld/main.py
.To note, if I add a pex_binary, I can run that successfully with run_against_entire_lockfile = true.lively-gpu-26436
05/01/2023, 7:36 PMpurple-plastic-57801
05/01/2023, 8:46 PMsilly-queen-7197
05/01/2023, 9:38 PMpants-jupyter-plugin
in VS code? If I run a regular notebook the following commands work
%load_ext pants_jupyter_plugin
%pants_repo ../
%pants_load item-rank
but if I try to use the notebook integration in VS code it seems to just hang (specifically `%pants_load item-rank)ancient-breakfast-45303
05/02/2023, 12:39 AMpex
2.1.135
venv create
doesn't omit a __main__.py
in the venv. Is that intentional? The command accepts a --bin-path
argument but I don't think it does anything unless the __main__.py
is omitted to the root of the venvrough-camera-14641
05/02/2023, 1:14 AMCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Any tips?boundless-zebra-79556
05/02/2023, 3:44 AM$ docker run --rm -it --gpus all --entrypoint=bash nvidia/cuda:11.7.1-devel-ubuntu22.04
# Inside docker env:
$ apt update && apt install -y python3.10 pip
$ pip install pex
$ pex torch==2.0.0
>>> import torch
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/root/.pex/installed_wheels/7a9319a67294ef02459a19738bbfa8727bb5307b822dadd708bc2ccf6c901aca/torch-2.0.0-cp310-cp310-manylinux1_x86_64.whl/torch/__init__.py", line 229, in <module>
from torch._C import * # noqa: F403
ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory
$ pip install torch==2.0.0
$ python3.10
>>> import torch
>>> torch.cuda.is_available()
# etc etc Works fine
Any idea why this might be the case? I need to use this image so that it will work well with EKS' rather outdated GPU driverbusy-vase-39202
05/02/2023, 1:19 PMripe-gigabyte-88964
05/02/2023, 4:38 PMrapid-bird-79300
05/02/2023, 5:34 PMVERSION = importlib.metadata.version("my_pkg")
When running with Pants environments we get
E importlib.metadata.PackageNotFoundError: my_pkg
I found some older thread that suggested to use python_distribution but it seems version
needs to be hardcoded there but we would prefer to leave version in the pyproject.toml
. Is there any other ways we can do that with pyproject.toml?hundreds-carpet-28072
05/03/2023, 9:47 AMscie-pants
but would like a better way to pin the version of the launcher. Are there plans to accommodate this in pants.toml
and via the get-pants
script? (https://github.com/pantsbuild/setup/blob/gh-pages/get-pants.sh)