-
Notifications
You must be signed in to change notification settings - Fork 110
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
Passing additional build arguments to Dockerfile.torchx #749
Comments
I have the same use case. In general, it would be useful to expose all the arguments to the |
Short AnswerYou can achieve this today by building your own base image using pure
Longer ExplanationThe thinking behind TorchX's docker workspace was to automate the building of ephemeral docker images (based on a base image) where the changes to the user workspace (e.g. the local directory of your project that contains your pytorch scripts) are "patched" into the base image. It wasn't really intended to fully build the base image. Therefore, originally we didn't have a concept of
While this approach works well for most pure python source projects, we added
cc) @d4l3k who originally designed and implemented docker workspace. Thoughts? |
@anjali-chadha does the index-url change depending on where it's being built from? I'm curious why you don't add the index to the Dockerfile. Another option could be to save it to a file that's read during the build
@kiukchung we do now have workspace specific options so it wouldn't be an issue\ to expose additional docker args such as the multistage tag. Any objections to adding more optional fields to the DockerWorkspaceMixin? https://github.com/pytorch/torchx/blob/main/torchx/workspace/docker_workspace.py#L87-L94 @schmidt-ai do you have a full list of options you would like to control? Anything other than the target? |
|
❓ Questions and Help
Please note that this issue tracker is not a help form and this issue will be closed.
Before submitting, please ensure you have gone through our
documentation.
Question
Use case:
My team uses torchx to submit the job to remote scheduler such as AWS Batch. While building the docker image, we want to use a private PyPi repository to install the python dependncies.
It seems that Dockerfile doesn't allow passing additional build arguments, besides
Image
andWorkspace
(reference). We need to pass additional build arguments such as pipindex-url
to point to our private PyPi repository during the image build process.Does the torchx team have any recommendations on how to achieve our use case of passing additional build args, while building the docker
The text was updated successfully, but these errors were encountered: