Skip to content
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

s2i: Add img support #33

Merged
merged 2 commits into from
Sep 18, 2018
Merged

s2i: Add img support #33

merged 2 commits into from
Sep 18, 2018

Conversation

gaocegege
Copy link
Contributor

What this PR does / why we need it:

img support added

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Special notes for your reviewer:

/cc @ddysher

Release note:

NONE

Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
@caicloud-bot caicloud-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Sep 12, 2018
@caicloud-bot caicloud-bot added the caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. label Sep 12, 2018
@gaocegege
Copy link
Contributor Author

/assign @ddysher

package img

const (
tensorflowTemplate = `FROM tensorflow/tensorflow:1.10.1-py3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure it will always work; most of the time, we need a lot libraries other than tensorflow. Do you have any solution in mind? I think this is not specific to ciao, but a general question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current stage, I prefer all-in-one support.

In the future, I think we should support adding new layers in the image to add dependencies while I have no detailed design for it since it is out of the scope of ciao now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rough approaches:

  1. analyze python source code and install imported packages, or use %package xxx syntax (slow)
  2. wrap add all commonly used packages in a base image (huge image)
  3. others..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created an issue for it. #35

return "", err
}

cmd := exec.Command("img", "build", "-t", imageName, dir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we need to pre-install img? what if notebook itself is running in a pod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then img should be added into the image, with runc and some other deps.

@gaocegege
Copy link
Contributor Author

/assign @ddysher

PTAL, I think we can merge the PR and implement other features in incoming PRs

@ddysher
Copy link
Member

ddysher commented Sep 17, 2018

/lgtm

@caicloud-bot caicloud-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 17, 2018
@gaocegege
Copy link
Contributor Author

/approve

@caicloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ddysher, gaocegege

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caicloud-bot caicloud-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2018
@caicloud-bot caicloud-bot merged commit a426204 into caicloud:master Sep 18, 2018
@gaocegege gaocegege deleted the img branch September 18, 2018 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants