Slackbot
05/02/2023, 5:09 PMFernando Camargo
05/02/2023, 9:28 PMdocker run --rm -v $PWD:/workspace -w /workspace -e HOME=/workspace -e PIPENV_VENV_IN_PROJECT=true <http://gcr.io/klue-dev-310020/pipenv:python-3.10|gcr.io/klue-dev-310020/pipenv:python-3.10> pipenv run bentoml build -f src/deployment/torch/bentofile.yaml
I ran this command right after running the previous one the packs the model. Since I'm mounting the current dir as /workspace
and setting it as the $HOME
, I can see the bentoml
folder, containing the model there.Fernando Camargo
05/02/2023, 9:36 PMfor dir_path, _, files in ctx_fs.walk():
for f in files:
path = fs.path.combine(dir_path, f.name).lstrip("/")
if specs.includes(
path,
recurse_exclude_spec=filter(
lambda s: fs.path.isparent(s[0], dir_path),
specs.from_path(build_ctx),
),
):
target_fs.makedirs(dir_path, recreate=True)
copy_file(ctx_fs, path, target_fs, path)
Fernando Camargo
05/02/2023, 9:48 PMbentofile.yaml
from:
include:
- "*.py"
to:
include:
- "src/**/*.py"
The problem was that it was looking for all the .py files possible (including the ones inside /.venv