You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker_scheduler: add support for building a new image from a workspace (#347)
Summary:
This adds a new `build_workspace_image` method on the DockerScheduler. This takes in a base image and the fsspec workspace path and creates a new docker image with the workspace overlaid on the base image and returns it.
This is the first steps towards implementing #333.
When docker builds an image it uses a build context which is uploaded to it via a tarball. This builds the context by walking the fsspec path for the files and taring them.
## Dockerfile:
A generated Dockerfile is added which does a naive copy. If the workspace contains a `Dockerfile`, that Dockerfile is used instead of the generated one.
Dockerfile
```
FROM <base>
COPY . .
```
Pull Request resolved: #347
Test Plan:
pytest torchx/schedulers/tests/docker_scheduler_test.py
pyre
Reviewed By: kiukchung
Differential Revision: D32472559
Pulled By: d4l3k
fbshipit-source-id: 79cc5e01af777a586d3d723c690a859af648950a
0 commit comments