-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support scanning the local Docker daemon's image list #1097
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- fix: Ensure the structural conformance of the ImageRow.resources column - fix: Workaround missing manifest of locally built images by using the image ID
- Added `images.is_local` column to skip registry-related logic properly.
Now you can build a simple Dockerfile like this: FROM python:3.11
# Install ipython kernelspec
RUN python3.11 -m pip install ipython ipykernel
RUN python3.11 -m ipykernel install --display-name "Python 3.11 on Backend.AI" && \
cat /usr/local/share/jupyter/kernels/python3/kernel.json
LABEL ai.backend.kernelspec=1 \
ai.backend.features="uid-match batch query" \
ai.backend.base-distro="ubuntu18.04" \
ai.backend.runtime-type="python" \
ai.backend.runtime-path="/usr/local/bin/python3" by: docker build -t bai-python:3.11 -f python.Dockerfile . and run it locally on a development setup as follows: ./backend.ai mgr image rescan --local
./backend.ai mgr start-server ./backend.ai ag start-server source env-local-admin-api.sh
./backend.ai admin domain update \ # required for the first time only
--allowed-docker-registries cr.backend.ai \ # depends on your setup
--allowed-docker-registries index.docker.io \
default
./backend.ai run --rm -c 'import sys;print("hello", sys.version_info)' index.docker.io/library/bai-python:3.11 Remaining TODO: Update the existing test suite |
TODO: prevent duplication of pulled images? (maybe checking the digest in the database) |
- We have been using config-digest (image ID) for other registry backends. Let's just use it in the local registry impl as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp:cli
Related to CLI component
comp:manager
Related to Manager component
effort:easy
Need to understand only a specific region of codes (good first issue, easy).
require:db-migration
Automatically set when alembic migrations are added or updated
size:L
100~500 LoC
type:feature
Add new features
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #1089
Note that I don't add
--local
option to the client CLI'sadmin image rescan
command because this is intended for local all-in-one development setups where you can directly access the manager CLI commandmgr image rescan
.Known restriction
When starting a new session via CLI, you must prepend "index.docker.io/library/" to your locally built image names if they don't have hostname/path prefixes.
Examples:
bai-python:3.11
->index.docker.io/library/bai-python:3.11
localdev/bai-python:3.11
->index.docker.io/localdev/bai-python:3.11
You also need to add
index.docker.io
to the allowed registry list of thedefault
domain.