-
Notifications
You must be signed in to change notification settings - Fork 30
error with line endings when generating Dockerfile on windows systems #185
Comments
Thanks for raising the issue and helping improve bentoctl 😃 This seems like a After that, you can try a build in debug mode. |
Hi Jithin,
Please find the details below:-
PS C:\Users\nayak\Documents\BentoML> bentoctl build -b
cancer_classifier:apmmnnyq22egxjcc -f deployment_config.yaml --debug
--dry-run
In debug mode. Intermediate bento saved to
C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-fu7 qbvp
error: failed to solve: executor failed running [/bin/bash -eo pipefail -c
bash <<EOF
set -euxo pipefail
(base) PS C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-fu7qubvp> docker
buildx build -f env/docker/Dockerfile .
[+] Building 4.5s (16/21)
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 32B
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 2B
0.0s
=> resolve image config for docker.io/docker/dockerfile:1.4-labs
4.0s
=> CACHED docker-image://
***@***.***:b50ad4af81d1c76ab7c0e1ffc216909e7adc23e99910243e1c88331c2a8ef52d
0.0s
=> [internal] load .dockerignore
0.0s
=> [internal] load build definition from Dockerfile
0.0s
=> [internal] load metadata for docker.io/library/python:3.9-slim
0.0s
=> [stage-0 1/13] FROM docker.io/library/python:3.9-slim
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 1.15kB
0.0s
=> CACHED [stage-0 2/13] RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo
'Binary::apt::APT::Keep-Downloaded-Packages "true";' >
/etc/apt/apt.conf.d/keep-cache
0.0s
=> CACHED [stage-0 3/13] RUN --mount=type=cache,target=/var/lib/apt
--mount=type=cache,target=/var/cache/apt apt-get update -y && apt-get
install -q -y --no-install-recommends --allow-remove-es 0.0s
=> CACHED [stage-0 4/13] RUN groupadd -g 1034 -o bentoml && useradd -m -u
1034 -g 1034 -o -r bentoml
0.0s
=> CACHED [stage-0 5/13] RUN mkdir /home/bentoml/bento && chown
bentoml:bentoml /home/bentoml/bento -R
0.0s
=> CACHED [stage-0 6/13] WORKDIR /home/bentoml/bento
0.0s
=> CACHED [stage-0 7/13] COPY --chown=bentoml:bentoml . ./
0.0s
=> ERROR [stage-0 8/13] RUN --mount=type=cache,target=/root/.cache/pip
bash <<EOF
0.3s
------
[stage-0 8/13] RUN --mount=type=cache,target=/root/.cache/pip bash
<<EOF:
: invalid option name1: set: pipefail
------
error: failed to solve: executor failed running [/bin/bash -eo pipefail -c
bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/python/install.sh ]; then
echo "install.sh to install python packages..."
chmod +x /home/bentoml/bento/env/python/install.sh
/home/bentoml/bento/env/python/install.sh
fi
EOF]: exit code: 2
(base) PS C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-fu7qubvp>
[image: image.png]
[image: image.png]
Thanks & Regards,
Plaban Nayak
…On Mon, Aug 1, 2022 at 12:54 PM Jithin James ***@***.***> wrote:
Thanks for raising the issue and helping improve bentoctl 😃
This seems like a docker buildx issue. Can you verify if docker and
docker buildx is installed properly on your system?
After that, you can try a build in debug mode.
run bentoctl build -b cancer_classifier:apmmnnyq22egxjcc -f
deployment_config.yaml --debug --dry-run
This will create the intermediate files in a location and will be logged.
change to that directory and perform a docker build docker buildx build
-f env/docker/Dockerfile .
can you share the output from that?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGOMFXR5ZOCHVHAH2NDVW53UNANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
got it! have you verified if |
Hi Jithin,
Could you please help me with the command to check if docker buildx is
working properly .
(base) PS C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-qd5yu1w2>* docker
buildx ls*
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
desktop-linux docker
desktop-linux desktop-linux running linux/amd64, linux/arm64,
linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7,
linux/arm/v6
default * docker
default default running linux/amd64, linux/arm64,
linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7,
linux/arm/v6
Thanks & Regards,
Plaban Nayak
…On Tue, Aug 2, 2022 at 8:23 AM Jithin James ***@***.***> wrote:
got it! have you verified if docker buildx is working correctly? can you
run docker buildx ls and share the output here too?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGNOMXKGGPASVX5CV63VXCERTANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@aarnphm probably has a better idea but it seems like your buildx version is also not up to date. Can you update that and try again? official instructions https://docs.docker.com/build/buildx/install/ |
Hi @jjmachan ,@aarnphm Please help me with a resolution. As intsructed have updated buildx (base) PS C:\Users\nayak> docker buildx ls I still encounter the same issue if [ -f /home/bentoml/bento/env/python/install.sh ]; then |
Hi @jjmachan ***@***.*** Please help me with a resolution.
As intsructed have updated buildx
(base) PS C:\Users\nayak> **docker pull docker/buildx-bin**
Using default tag: latest
latest: Pulling from docker/buildx-bin
879a2709db88: Pull complete
Digest:
sha256:44a7217da633dd01f621ebcfe75410cd98f81edcff5b43de33eeb65582d6f055
Status: Downloaded newer image for docker/buildx-bin:latest
docker.io/docker/buildx-bin:latest
(base) PS C:\Users\nayak> **docker pull docker/buildx-bin**
Using default tag: latest
latest: Pulling from docker/buildx-bin
Digest:
sha256:44a7217da633dd01f621ebcfe75410cd98f81edcff5b43de33eeb65582d6f055
Status: Image is up to date for docker/buildx-bin:latest
docker.io/docker/buildx-bin:latest
(base) PS C:\Users\nayak> **docker buildx version**
github.com/docker/buildx v0.6.3 266c0eac611d64fcc0c72d80206aa364e826758d
(base) PS C:\Users\nayak> **docker buildx ls**
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
desktop-linux docker
desktop-linux desktop-linux running linux/amd64, linux/arm64,
linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7,
linux/arm/v6
default * docker
default default running linux/amd64, linux/arm64,
linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7,
linux/arm/v6
**I still encounter the same issue**
(base) PS C:\Users\nayak\Documents\BentoML> bentoctl build -b
cancer_classifier:apmmnnyq22egxjcc -f deployment_config.yaml --debug
--dry-run
In debug mode. Intermediate bento saved to
C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-slxsmtqs
error: failed to solve: executor failed running [/bin/bash -eo pipefail -c
bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/python/install.sh ]; then
echo "install.sh to install python packages..."
chmod +x /home/bentoml/bento/env/python/install.sh
/home/bentoml/bento/env/python/install.sh
fi
EOF]: exit code: 2
…On Tue, Aug 2, 2022 at 10:06 AM Jithin James ***@***.***> wrote:
@aarnphm <https://github.com/aarnphm> probably has a better idea but it
seems like your buildx version is also not up to date. Can you update that
and try again? official instructions
https://docs.docker.com/build/buildx/install/
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGP46R7MBSVAQU6SPRLVXCQVZANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Can you build the container without bentoctl? |
Hi @jjmachan, Any help to resolve the issue will be highly appreciated Thanks |
Hi Aaron,
Yes I am able to do it
bentoml serve service.py:svc --reload
run bentoml build from current directory to start the Bento build:
Successfully built Bento(tag="cancer_classifier:apmmnnyq22egxjcc")
PS C:\Users\nayak\Documents\BentoML> bentoml list
Tag Size Creation Time Path
cancer_classifier:apmmnnyq22egxjcc 32.96 KiB 2022-07-31 19:08:13
~\bentoml\bentos\cancer_classifier\apmmnnyq22egxjcc
Thanks & Regards,
Plaban Nayak
…On Wed, Aug 3, 2022 at 9:55 AM Aaron Pham ***@***.***> wrote:
Can you build the container without bentoctl?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGMZCEM74A7AORWR7QDVXHYDJANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Another quick q, are you running docker from WSL or Docker Desktop? |
Hi Aaron,
I am running docker from WSL.
Thanks & Regards,
Plaban Nayak
…On Thu, Aug 4, 2022 at 2:06 AM Aaron Pham ***@***.***> wrote:
Another quick q, are you running docker from WSL or Docker Desktop?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGNUJMJ5ODSOGDTBMGTVXLJ37ANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You did say that you have buildx available. 🤔 |
Hi Aaron,
Please find the docker buildx version.
(base) PS C:\Users\nayak> docker buildx version
github.com/docker/buildx v0.6.3 266c0eac611d64fcc0c72d80206aa364e826758d
Thanks& Regards,
Plaban Nayak
…On Thu, Aug 4, 2022 at 9:18 AM Aaron Pham ***@***.***> wrote:
You did say that you have buildx available. 🤔
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGLJWIAQ4S3UAUV3CI3VXM4SNANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Can you update the buildx version to the latest one and try again? |
Hi Aaron,
I did the following steps . But still encounter the same problem.Please
validate and help me in case I am doing something wrong
(base) PS C:\Program Files\Docker\cli-plugins> *wget -O ~/.docker-buildx
https://github.com/docker/buildx/releases/download/v0.8.2/buildx-v0.8.2.linux-amd64
<https://github.com/docker/buildx/releases/download/v0.8.2/buildx-v0.8.2.linux-amd64>*
(base) PS C:\Program Files\Docker\cli-plugins> *docker buildx version*
*github.com/docker/buildx <http://github.com/docker/buildx> v0.6.3
266c0eac611d64fcc0c72d80206aa364e826758d*
(base) PS C:\Program Files\Docker\cli-plugins> *docker buildx install*
(base) PS C:\Program Files\Docker\cli-plugins> *docker buildx version*
*github.com/docker/buildx <http://github.com/docker/buildx> v0.6.3
266c0eac611d64fcc0c72d80206aa364e826758d*
(base) PS C:\Users\nayak\Documents\BentoML> *bentoml list*
Tag Size Creation Time Path
* cancer_classifier:nfhcz6qtxkbedjcc 302.18 MiB 2022-08-04 11:28:09
~\bentoml\bentos\cancer_classifier\nfhcz6qtxkbedjcc
iris_classifier:3vnsv6asmwirhjcc
15.81 KiB 2022-08-02 18:50:26
~\bentoml\bentos\iris_classifier\3vnsv6asmwirhjcc
iris_classifier:542zfuqsmoi3fjcc
15.81 KiB 2022-08-02 18:36:37
~\bentoml\bentos\iris_classifier\542zfuqsmoi3fjcc
cancer_classifier:apmmnnyq22egxjcc
32.96 KiB 2022-07-31 19:08:13
~\bentoml\bentos\cancer_classifier\apmmnnyq22egxjcc*
(base) PS C:\Users\nayak\Documents\BentoML> *bentoml models list*
Tag Module Size Creation Time
*iris_clf:ye6uidasmwbsdjcc bentoml.sklearn 5.62 KiB 2022-08-02
18:49:36 iris_clf:5fxmxcasmon5ljcc bentoml.sklearn 5.62 KiB
2022-08-02 18:36:24 booster_tree:jjzrgfqq2kolbjcc bentoml.xgboost 23.30
KiB 2022-07-31 18:41:29*
(base) PS C:\Users\nayak\Documents\BentoML> bentoctl init
Bentoctl Interactive Deployment Config Builder
Welcome! You are now in interactive mode.
This mode will help you setup the deployment_config.yaml file required for
deployment. Fill out the appropriate values for the fields.
(deployment config will be saved to: ./deployment_config.yaml)
api_version: v1
name: cancer_classifier
operator:
name: aws-lambda
template: terraform
spec:
region: us-east-2
timeout: 15
memory_size: 512
filename for deployment_config [deployment_config.yaml]:
deployment config file exists! Should I override? [Y/n]: Y
deployment config generated to: deployment_config.yaml
✨ generated template files.
- bentoctl.tfvars
- main.tf
(base) PS C:\Users\nayak\Documents\BentoML>
(base) PS C:\Users\nayak\Documents\BentoML>* bentoml containerize
cancer_classifier:latest*
*Building docker image for
Bento(tag="cancer_classifier:nfhcz6qtxkbedjcc")...Successfully built docker
image "cancer_classifier:nfhcz6qtxkbedjcc"*
To run your newly built Bento container, use: "docker run -it --rm -p
3000:3000 cancer_classifier:nfhcz6qtxkbedjcc"
(base) PS C:\Users\nayak\Documents\BentoML>
(base) PS C:\Users\nayak\Documents\BentoML>* docker run -it --rm -p
3000:3000 cancer_classifier:nfhcz6qtxkbedjcc*
2022-08-04T06:04:50+0000 [INFO] [cli] Service loaded from Bento directory:
bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
*2022-08-04T06:04:51+0000 [INFO] [cli] Starting production BentoServer from
"/home/bentoml/bento" running on http://0.0.0.0:3000 <http://0.0.0.0:3000>
(Press CTRL+C to quit)*
2022-08-04T06:04:52+0000 [INFO] [api_server:8] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:1] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:2] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:5] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:4] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [runner:booster_tree:1] Service loaded from
Bento directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:11] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:6] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:7] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [runner:booster_tree:1] Setting up worker:
set CPU thread count to 12
2022-08-04T06:04:52+0000 [INFO] [api_server:9] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:52+0000 [INFO] [api_server:10] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:53+0000 [INFO] [api_server:12] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:04:53+0000 [INFO] [api_server:3] Service loaded from Bento
directory: bentoml.Service(tag="cancer_classifier:nfhcz6qtxkbedjcc",
path="/home/bentoml/bento/")
2022-08-04T06:05:10+0000 [INFO] [api_server:3] 172.17.0.1:53698
(scheme=http,method=GET,path=/,type=,length=) (status=200,type=text/html;
charset=utf-8,length=790) 0.001ms
(trace=220516410139264950285412778910954192211,span=9316540740728650785,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:3] 172.17.0.1:53698
(scheme=http,method=GET,path=/static_content/swagger-ui.css,type=,length=)
(status=200,type=text/css; charset=utf-8,length=143980) 0.012ms
(trace=179842158731351380507878764366801059637,span=13079929633582253200,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:12] 172.17.0.1:53696
(scheme=http,method=GET,path=/static_content/index.css,type=,length=)
(status=200,type=text/css; charset=utf-8,length=233) 0.014ms
(trace=277742223342556230769942546004769615448,span=14678345293950772487,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:9] 172.17.0.1:53710
(scheme=http,method=GET,path=/static_content/swagger-initializer.js,type=,length=)
(status=200,type=application/javascript,length=382) 0.012ms
(trace=134834640285538420263163172767507914351,span=4990766697434115548,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:7] 172.17.0.1:53706
(scheme=http,method=GET,path=/static_content/swagger-ui-standalone-preset.js,type=,length=)
(status=200,type=application/javascript,length=339540) 0.018ms
(trace=238765016389083102165471097661395348822,span=5832496162839042442,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:10] 172.17.0.1:53702
(scheme=http,method=GET,path=/static_content/swagger-ui-bundle.js,type=,length=)
(status=200,type=application/javascript,length=1096221) 0.024ms
(trace=218752250589705974188965646825831090603,span=9157418109145729948,sampled=0)
2022-08-04T06:05:10+0000 [INFO] [api_server:10] 172.17.0.1:53702
(scheme=http,method=GET,path=/docs.json,type=,length=)
(status=200,type=application/json,length=1753) 0.001ms
(trace=282291790197061191952152831741196946713,span=16051579166601308355,sampled=0)
(base) PS C:\Users\nayak\Documents\BentoML>* bentoctl build -b
cancer_classifier:apmmnnyq22egxjcc -f deployment_config.yaml*
*error: failed to solve: executor failed running [/bin/bash -eo pipefail -c
bash <<EOFset -euxo pipefail*
if [ -f /home/bentoml/bento/env/python/install.sh ]; then
echo "install.sh to install python packages..."
chmod +x /home/bentoml/bento/env/python/install.sh
/home/bentoml/bento/env/python/install.sh
fi
EOF]: exit code: 2
Traceback (most recent call last):
File "C:\Users\nayak\anaconda3\lib\runpy.py", line 197, in
_run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\nayak\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\nayak\anaconda3\Scripts\bentoctl.exe\__main__.py", line 7,
in <module>
sys.exit(bentoctl())
File
"C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py",
line 1130, in __call__
return self.main(*args, **kwargs)
File
"C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py",
line 1055, in main
rv = self.invoke(ctx)
File
"C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py",
line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File
"C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py",
line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File
"C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py",
line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py",
line 90, in wrapper
return_value = func(*args, **kwargs)
File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py",
line 55, in wrapper
return func(*args, **kwargs)
File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py",
line 24, in wrapper
return func(*args, **kwargs)
File
"C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\__init__.py", line
147, in build
generate_deployable_container(
File
"C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\docker_utils.py", line
99, in generate_deployable_container
buildx.build(**buildx_args)
File
"C:\Users\nayak\anaconda3\lib\site-packages\bentoml\_internal\utils\buildx.py",
line 301, in build
run_docker_cmd(cmds, env=subprocess_env, cwd=cwd)
File
"C:\Users\nayak\anaconda3\lib\site-packages\bentoml\_internal\utils\buildx.py",
line 314, in run_docker_cmd
subprocess.check_output(list(map(str, cmds)), env=subprocess_env,
cwd=cwd)
File "C:\Users\nayak\anaconda3\lib\subprocess.py", line 424, in
check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\nayak\anaconda3\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
*subprocess.CalledProcessError: Command '['docker', 'buildx', 'build',
'--progress', 'auto', '--tag',
'aws-lambda-cancer_classifier:apmmnnyq22egxjcc', '--platform',
'linux/amd64', '--file', 'env/docker/Dockerfile', '.']' returned non-zero
exit status 1.*
(base) PS C:\Users\nayak\Documents\BentoML>
Thanks,
Plaban Nayak
…On Thu, Aug 4, 2022 at 10:45 AM Aaron Pham ***@***.***> wrote:
Can you update the buildx version to the latest one and try again?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGGGM7VA5XWLJ57GUCKELVXNGVRANCNFSM55GJCFAA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
hi @aarnphm (base) PS C:\Program Files\Docker\cli-plugins> wget -O ~/.docker-buildx (base) PS C:\Users\nayak\Documents\BentoML> bentoml list
iris_clf:ye6uidasmwbsdjcc bentoml.sklearn 5.62 KiB 2022-08-02 (base) PS C:\Users\nayak\Documents\BentoML> bentoctl init Welcome! You are now in interactive mode. This mode will help you setup the deployment_config.yaml file required for (deployment config will be saved to: ./deployment_config.yaml) api_version: v1
(base) PS C:\Users\nayak\Documents\BentoML>* bentoml containerize Building docker image for (base) PS C:\Users\nayak\Documents\BentoML>* bentoctl build -b error: failed to solve: executor failed running [/bin/bash -eo pipefail -c if [ -f /home/bentoml/bento/env/python/install.sh ]; then |
My docker buildx version is now up to date Details of docker file 1. C:\Users\nayak\bentoml\bentos\cancer_classifier\apmmnnyq22egxjcc\env\docker\DockerFile # syntax = docker/dockerfile:1.4-labs
#
# ===========================================
#
# THIS IS A GENERATED DOCKERFILE. DO NOT EDIT
#
# ===========================================
# Block SETUP_BENTO_BASE_IMAGE
FROM python:3.9-slim
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONIOENCODING=UTF-8
ENV PYTHONUNBUFFERED=1
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/lib/apt \
--mount=type=cache,target=/var/cache/apt \
apt-get update -y \
&& apt-get install -q -y --no-install-recommends --allow-remove-essential \
ca-certificates gnupg2 bash build-essential
# Block SETUP_BENTO_USER
ARG BENTO_USER=bentoml
ARG BENTO_USER_UID=1034
ARG BENTO_USER_GID=1034
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
SHELL [ "/bin/bash", "-eo", "pipefail", "-c" ]
ARG BENTO_PATH=/home/bentoml/bento
ENV BENTO_PATH=$BENTO_PATH
ENV BENTOML_HOME=/home/bentoml/
RUN mkdir $BENTO_PATH && chown bentoml:bentoml $BENTO_PATH -R
WORKDIR $BENTO_PATH
# init related components
COPY --chown=bentoml:bentoml . ./
# Block SETUP_BENTO_COMPONENTS
# Running install.sh to install python packages
RUN --mount=type=cache,target=/root/.cache/pip bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/python/install.sh ]; then
echo "install.sh to install python packages..."
chmod +x /home/bentoml/bento/env/python/install.sh
/home/bentoml/bento/env/python/install.sh
fi
EOF
# Running user setup scripts
RUN bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/docker/setup_script ]; then
echo "user setup scripts..."
chmod +x /home/bentoml/bento/env/docker/setup_script
/home/bentoml/bento/env/docker/setup_script
fi
EOF
# Block SETUP_BENTO_ENTRYPOINT
RUN rm -rf /var/lib/{apt,cache,log}
# Default port for BentoServer
EXPOSE 3000
RUN chmod +x /home/bentoml/bento/env/docker/entrypoint.sh
USER bentoml
ENTRYPOINT [ "/home/bentoml/bento/env/docker/entrypoint.sh" ]
CMD [ "bentoml", "serve", "/home/bentoml/bento", "--production" ] |
2. C:\Users\nayak\AppData\Local\Temp\bentoctl-temp-upibeijr\env\docker\Dockerfile # syntax = docker/dockerfile:1.4-labs
#
# ===========================================
#
# THIS IS A GENERATED DOCKERFILE. DO NOT EDIT
#
# ===========================================
# Block SETUP_BENTO_BASE_IMAGE
FROM python:3.9-slim
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONIOENCODING=UTF-8
ENV PYTHONUNBUFFERED=1
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/lib/apt \
--mount=type=cache,target=/var/cache/apt \
apt-get update -y \
&& apt-get install -q -y --no-install-recommends --allow-remove-essential \
ca-certificates gnupg2 bash build-essential
# Block SETUP_BENTO_USER
ARG BENTO_USER=bentoml
ARG BENTO_USER_UID=1034
ARG BENTO_USER_GID=1034
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
SHELL [ "/bin/bash", "-eo", "pipefail", "-c" ]
ARG BENTO_PATH=/home/bentoml/bento
ENV BENTO_PATH=$BENTO_PATH
ENV BENTOML_HOME=/tmp
RUN mkdir $BENTO_PATH && chown bentoml:bentoml $BENTO_PATH -R
WORKDIR $BENTO_PATH
# init related components
COPY --chown=bentoml:bentoml . ./
# Block SETUP_BENTO_COMPONENTS
# Running install.sh to install python packages
RUN --mount=type=cache,target=/root/.cache/pip bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/python/install.sh ]; then
echo "install.sh to install python packages..."
chmod +x /home/bentoml/bento/env/python/install.sh
/home/bentoml/bento/env/python/install.sh
fi
EOF
# Running user setup scripts
RUN bash <<EOF
set -euxo pipefail
if [ -f /home/bentoml/bento/env/docker/setup_script ]; then
echo "user setup scripts..."
chmod +x /home/bentoml/bento/env/docker/setup_script
/home/bentoml/bento/env/docker/setup_script
fi
EOF
# Block SETUP_BENTO_ENTRYPOINT
EXPOSE 3000
ENV BENTOML_CONFIG=/home/bentoml/bento/bentoml_config.yaml
RUN --mount=type=cache,target=/root/.cache/pip pip install awslambdaric==2.0.0 mangum==0.12.3
USER root
ADD ./aws-lambda-rie /usr/local/bin/aws-lambda-rie
RUN chmod +x /usr/local/bin/aws-lambda-rie
RUN chmod +x /home/bentoml/bento/env/docker/entry_script.sh
ENTRYPOINT ["/home/bentoml/bento/env/docker/entry_script.sh"] |
Describe the bug
resources that explain more about this bug
I encounter the below error when trying to build the model image using bentoctl build . Can you please help me.
Command tried :
$ bentoctl build -b cancer_classifier:apmmnnyq22egxjcc -f ./deployment_config.yaml
Error Encountered
To Reproduce
Steps to reproduce the issue:
$ bentoml list
Tag Size Creation Time Path
cancer_classifier:apmmnnyq22egxjcc 32.96 KiB 2022-07-31 19:08:13 ~\bentoml\bentos\cancer_classifier\apmmnnyq22egxjcc
bentofile.yaml
service: "service:svc"
description: "My XGBoost service"
python:
packages:
bentoctl operator install aws-lambda
bentoctl init it produced 3 files --> deployment_config.yaml, bentoctl.tfvars, main.tf
6. bentoctl build -b cancer_classifier:apmmnnyq22egxjcc -f deployment_config.yaml
7. See error
Expected behavior
The build for the deployable artifacts required for this deployment shou;d go through but I encounter error as specified in the snapshot attached
PS C:\Users\nayak\Documents\BentoML> .\terraform init
Initializing the backend...
Initializing provider plugins...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
For more help on using this command, run:
terraform apply -help
Screenshots/Logs
-->
Environment:
Additional context
NA
The text was updated successfully, but these errors were encountered: