Skip to main content
0 votes
1 answer
57 views

What characters are allowed in the file name (Focus equal '=')?

I want to pass a folder as a dependency for a py_test in Bazel. This contains file names with the special character '=', such as 'equal=.txt'. I receive a terminal print that the file could not be ...
Gelsengamer's user avatar
2 votes
1 answer
100 views

bazel build and run grpc server with python

I am trying to setup a larger bazel infrastructure to Create .py files from a .proto file for gRPC using rules_proto_grpc_python Run the server code that implements the interfaces defined in 1 via a ...
kgully's user avatar
  • 682
1 vote
0 answers
60 views

How to integrate VSCode debugger for Python Bazel projects without altering source code?

I have a monorepo project built with Bazel and I'm trying to integrate VSCode debuggers directly with Python targets I'm running. There is a similar question that helps solve the problem here: How to ...
Michael Becker's user avatar
0 votes
0 answers
35 views

Bazel python interpreter commandline flags

How to make a py_binary target that accepts interpreter flags such as -OO and -W? I want the bazel_binary to create an executable that runs python -OO -W main.py. py_binary( name="main", ...
Jack Shi's user avatar
0 votes
0 answers
41 views

Custom py_binary bazel target that uses deepspeed instead of python3 toolchain

In order to use deepspeed, I need to use the cli to run deepspeed main.py instead of python3 main.py. My goal is to create a deepspeed_py_binary target that is 99% the same as py_binary except it uses ...
Jack Shi's user avatar
0 votes
1 answer
74 views

How do I include a cmake target as a dependency in a py_library target? (tiny-cuda-nn)

I'm trying to wrap tiny-cuda-nn with bazel to include as a dependency for other projects. This is a cmake project, but it has bindings for Python. The conventional way to install this would be with a ...
Chuck's user avatar
  • 2,112
1 vote
0 answers
343 views

Build a docker image for Python with Bazel Docker OCI

I’m working on a project that involves building Docker images using Python. I came across an example that uses the py_oci_image rule to construct an OCI image. Unfortunately, the example relies on ...
Modi's user avatar
  • 2,355
0 votes
1 answer
58 views

Different Python versions for different Bazel targets?

I have many py_library, py_binary and py_test targets. Some of these must run against 3.9.16 (constraint outside of my control) and others use 3.10.6 (in order to get more recent features). In my ...
sdgfsdh's user avatar
  • 37.3k
0 votes
1 answer
303 views

How do I provide a py_binary's runfiles to a C toolchain in Bazel

I am trying to write a compiler, well, a Python wrapper for Clang that does some platform specific stuff in Bazel. I have created a MRE where I can reproduce my problem here: https://github.com/...
mallwright's user avatar
  • 1,985
1 vote
1 answer
230 views

Issue Running Python Application with Bazel - ImportError with NumPy C-Extensions

I have a Python project which I am building and running with Bazel. The project includes dependencies such as flask, transformers, and numpy. When I attempt to run my application using Bazel, I ...
ModiCnvrg's user avatar
1 vote
0 answers
164 views

is there a way to run bazel tests in required sequence?

how to enforce bazel test targets to run in specific order on CI builds? because test results of one depends on another tetss results? I have four targets init,up,down,rm and I want to run the tests ...
Sivakumar's user avatar
0 votes
0 answers
898 views

How to use an installed requirement in bazel BUILD file?

I am creating a new bazel workspace for a python codebase. The codebase has multiple folders with respective BUILD files. Each of the BUILD file has different external dependencies. These external ...
Nisha Tiwari's user avatar
5 votes
2 answers
1k views

Bazel cross platform build fails with "Unable to find a CC toolchain using toolchain resolution."

I have a python binary that I build with bazel on Mac. Now, I want to create the binary for linux for deployment. I am following this instruction. I added platform( name = "linux_x86", ...
JackDaniels's user avatar
  • 1,071
2 votes
1 answer
916 views

binary file not found when running bazel oci_image on local docker

I have a bazel project (monorepo), that has some go and python code. I use bazel for building. For each of these, I want to create separate container. For creating python image, I am following this ...
JackDaniels's user avatar
  • 1,071
2 votes
1 answer
158 views

Bazel - How to create Deps for a Rule from dynamic list of targest directories

I want to create deps in a rule in Bazel that will be dynamic and not hardcoded, from a list of directories. Here is the file structure: | //plugins_folder ├── code0.py ├── BUILD ├── plugin1 | ├──...
Ran Silberman's user avatar

15 30 50 per page