-
Describe the bugAttempting to deploy the docker image build yaml file available under https://github.com/polyaxon/polyaxon-examples/blob/master/in_cluster/build_image/build-ml.yaml using the polyaxon cli returns the following error:
To reproduceThe contents of
Expected behaviorA build operation should begin that results in an image being saved to the docker registry connected under destination: connection: EnvironmentPolyaxon 1.8.0 |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments
-
Can you check if your environment has by any chance the legacy CLI also installed:
If it's the case, you need to uninstall the legacy libraries and only keep the new python library. |
Beta Was this translation helpful? Give feedback.
-
These are the only two polyaxon libraries installed: |
Beta Was this translation helpful? Give feedback.
-
Libraries installed are correct, I quickly tried and was not able to reproduce the file was submitted correctly. |
Beta Was this translation helpful? Give feedback.
-
I can confirm that the same error appears using a freshly installed polyaxon 1.8.0 on the windows subsystem for linux (ubuntu) with the same file. |
Beta Was this translation helpful? Give feedback.
-
@mouradmourafiq any updates? :) |
Beta Was this translation helpful? Give feedback.
-
@minaadel sorry, completely forgot about this :) I think it might be some formatting issues due to windows? Can you run Also you might copy the content to an editor to check if you are using spaces or tabs, I think yaml has issues with tabs. |
Beta Was this translation helpful? Give feedback.
-
No issue, it happens :) Here's the output of the check command.
The actual file itself uses 2 spaces per indentation, no tabs |
Beta Was this translation helpful? Give feedback.
-
Very strange, and I could not reproduce. Did you try other files in the same examples folder https://github.com/polyaxon/polyaxon-examples/tree/master/in_cluster/build_image ? version: 1.1
kind: operation
name: build
params:
destination:
connection: localreg
value: "polyaxon-examples:ml"
runPatch:
init:
- dockerfile:
image: "python:3.8.8-buster"
run:
- 'pip3 install --no-cache-dir -U polyaxon["polyboard"]'
- 'pip3 install scikit-learn xgboost matplotlib vega-datasets joblib lightgbm xgboost'
langEnv: 'en_US.UTF-8'
hubRef: kaniko Finally you may try with |
Beta Was this translation helpful? Give feedback.
-
You're absolutely correct! One last question though (I can open a new issue with the question if you'd like), how am I supposed to pull that same image from the localreg connection from within a polyaxonfile with |
Beta Was this translation helpful? Give feedback.
-
I am not sure how you declared the registry and what type of registry you are using, but you will need something like run:
container:
image: "172.0.0.1:31320/name:latest" If you are using GCR, the url will be the full GCR url with the image name and tag. |
Beta Was this translation helpful? Give feedback.
-
I use the microk8s built in docker registry enabled via
The entire reason I'm trying to use a named connection is to abstract from having to use the particular ip of the registry when submitting a job to the polyaxon instance.
and wanted to do something similar with the component operation (experiment run). |
Beta Was this translation helpful? Give feedback.
-
This is planned but not implemented yet, see #1049, where the user can declare a There's also a discussion going on in slack for providing an automated build process(https://polyaxon.slack.com/archives/C6QBND2SV/p1618316341162200) but we are still gathering interest and thinking about the best approach to provide such feature. |
Beta Was this translation helpful? Give feedback.
-
So if I understand you correctly, there is currently no way to use a polyaxon registry connection to pull an image from that registry. It is currently only possible just to build an image and push it to said registry via the connection. Any image pulling needs to be done using the IP of the registry. Have I understood that properly? |
Beta Was this translation helpful? Give feedback.
-
I guess a kinda hacky way to achieve my particular use case is to define a fixed url in
which can be reached in a unified manner from within a polyaxon run as:
Thank you very much for your assistance :) |
Beta Was this translation helpful? Give feedback.
Very strange, and I could not reproduce. Did you try other files in the same examples folder https://github.com/polyaxon/polyaxon-examples/tree/master/in_cluster/build_image ?
Not sure if quoting all values would work on your system:
Finally you may try with
polyaxon -v ...
to trigger some add…