Open fernandocamargoai opened 6 years ago
I'm not familiar with this tool, but I took a look at https://github.com/eywalker/nvidia-docker-compose/blob/master/bin/nvidia-docker-compose
I think the way to use the tool is with the --generate
flag. Something like this should work:
mount=source:
bind: .
path: /work
image=nvidia-compose-generator:
image: nvidia-compose-generator
context: .
steps: |
FROM python:3.6-alpine3.6
pip install nvidia-docker-compose
job=generate-compose-file:
use: nvidia-compose-generator
mounts: [source]
command: "nvidia-compose-generator --generate"
sources: [docker-compose.yml]
artifact: nvidia-docker-compose.yml
compose=dev-env:
files: [nvidia-docker-compose.yml]
project: '{project}'
depends: [generate-compose-file]
nvidia-compose-generator
- builds an image which contains the nvidia-docker-compose tool (steps
was added in v0.10, you could also use a pre-built image, or a dockerfile as well)generate-compose-file
- runs the tool to generate the compose file. This step will be skipped if there are no updates to the compose file.dev-env
- runs docker-compose
with the generated file.Thank you, @dnephin. I've just started using your tool, so I couldn't think about that solution.
There's the compose task, but I can't find anything about using something like nvidia-docker-compose (necessary to use CUDA).