-
Notifications
You must be signed in to change notification settings - Fork 164
chore(BA-2328): Add Dockerfile and entrypoint for Backend.AI Manager #5913
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
base: main
Are you sure you want to change the base?
Conversation
Introduces backend.ai-manager.Dockerfile to build and run the Backend.AI Manager service, including wheel installation, directory setup, and port exposure. Adds entrypoint.sh to handle keypair generation, directory creation, and service startup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces Docker containerization support for the Backend.AI Manager service by adding a Dockerfile and entrypoint script to enable deployment as a containerized service.
- Adds multi-stage Docker build configuration for the Backend.AI Manager
- Implements entrypoint script for RPC keypair generation and directory setup
- Exposes port 8091 and sets up necessary volume mount points
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| backend.ai-manager.Dockerfile | Multi-stage Docker build with wheel installation and service configuration |
| entrypoint.sh | Bash script for container initialization, keypair generation, and service startup |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| FROM python:${PYTHON_VERSION} | ||
| COPY --from=builder /wheels /wheels | ||
| RUN mkdir -p /root/.ssh | ||
| RUN apt-get update && apt-get install -y vim && rm -rf /var/lib/apt/lists/* |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing vim in a production container image adds unnecessary bloat. Consider removing this package unless it's specifically required for debugging purposes in production environments.
| RUN apt-get update && apt-get install -y vim && rm -rf /var/lib/apt/lists/* | |
| # Removed vim installation to reduce image bloat |
| # fixtures directory creation (default path structure) | ||
| mkdir -p /app/fixtures/manager | ||
|
|
||
| # RPC keypair not found. Generating... |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 9 is misleading as it states 'RPC keypair not found' before the actual check. This comment should either be removed or moved inside the if block where the keypair is actually determined to be missing.
| # RPC keypair not found. Generating... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the RPC key doesn't exist, you'll need to create it. The execution part has become complicated, so I separated it into an sh file.
| ARG PYTHON_VERSION | ||
| FROM python:${PYTHON_VERSION} AS builder | ||
| ARG PKGVER | ||
| COPY dist /dist | ||
| RUN pip wheel --wheel-dir=/wheels --no-cache-dir backend.ai-manager==${PKGVER} --find-links=/dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we need to do the wheel build inside the dockerfile.
Introduces backend.ai-manager.Dockerfile to build and run the Backend.AI Manager service, including wheel installation, directory setup, and port exposure. Adds entrypoint.sh to handle keypair generation, directory creation, and service startup.
resolve #5823 (BA-2328)
Checklist: (if applicable)