billowy-crowd-51528
09/18/2023, 8:49 PMpython_requirements
in the __dependencies_rules__
but it doesn’t seem to work, no matter what I put in the rule-set. 🧵billowy-crowd-51528
09/18/2023, 8:50 PM# This may only IMPORT ...
__dependencies_rules__(
(
"*", # applies to everything in this BUILD file
"/**", # may depend on anything in this subtree
"reqs",
"/reqs",
"/shared_reqs",
"//shared_reqs",
"//:shared_reqs#gunicorn",
"//:shared_reqs#*",
"/src/libs/**", # may use `libs`
allowed_dependencies, # extra allowed dependencies
"!*", # may not depend on anything else
),
("*", "*"),
)
BUILD
# Default target of `<directory_name>`
python_sources()
# TODO config file for gunicorn so that staging & prod are diff
# README INSTALL PEX AND PANTS
pex_binary(
# This determines the output of the binary.
name="classifier-api",
# The command to run.
script="gunicorn",
args=["<http://services.classifier.app:app|services.classifier.app:app>", "-w=1", "-b=0.0.0.0", "--log-level=debug"],
# Essentially specifying the requirements.txt file.
dependencies=[
"//:shared_reqs#gunicorn", # need to explicitly add gunicorn because it's not part of imports.
":classifier" # need to add the "self" package so that it's included in the pex.
],
environment="python_bullseye"
)
docker_image(
context_root="",
name="docker-classifier",
)
The error:
* src/services/classifier/BUILD[!*] -> : DENY
pex_binary src/services/classifier:classifier-api -> python_requirements //:shared_
reqs#gunicorn
billowy-crowd-51528
09/18/2023, 8:52 PMrequirements.txt (shared_reqs)
BUILD
/src
/services
/classifier
...
/search
...
/libs
/libA
/libB
billowy-crowd-51528
09/18/2023, 9:04 PM"//shared_reqs#*",
curved-television-6568
09/18/2023, 9:08 PM