freezing-vase-46551
06/15/2024, 12:19 AMdry-beach-38304
06/15/2024, 12:22 AMfreezing-vase-46551
06/15/2024, 12:23 AMfreezing-vase-46551
06/15/2024, 12:23 AMfreezing-vase-46551
06/15/2024, 12:24 AMdry-beach-38304
06/17/2024, 6:29 AM@conda will create a “clean slate”. It is meant to isolate you from the underlying image’s environment in a way (it’s not additive)
◦ if you have a docker image with everything you need on it, by all means, use that and don’t use @conda/@pypi
• if you use @conda, packages are taken from the conda world (so not pypi). In particularl, I don’t think tensorflow-gpu in the conda world (https://anaconda.org/conda-forge/tensorflow-gpu) is deprecated. It does seem to depend on regular tensorflow but also a cuda environment which may help with it not finding GPUs 🙂freezing-vase-46551
06/20/2024, 8:32 PMdry-beach-38304
06/20/2024, 9:47 PM@conda should not remove the CUDA instructions and you should be able to build a conda environment with CUDA libraries and then install promise on top of it. No promises or anything but I can then try to resolve the environment for you and see if it works properly (if you have a test flow to confirm whether it works or not that would be helpful too)freezing-vase-46551
06/21/2024, 1:39 AMimage="<http://docker.io/tensorflow/tensorflow:latest-gpu|docker.io/tensorflow/tensorflow:latest-gpu> .freezing-vase-46551
06/21/2024, 1:39 AMfreezing-vase-46551
06/21/2024, 1:40 AMfrom metaflow import FlowSpec, step, batch, conda, conda_base, pypi
@conda_base(python='3.12')
class dummy_test_pypi(FlowSpec):
@batch(gpu=1, image="<http://docker.io/tensorflow/tensorflow:latest-gpu|docker.io/tensorflow/tensorflow:latest-gpu>", queue="job-queue-gpu-metaflow",)
# @pypi(packages={'keras-cv': '0.9.0', 'tensorflow': '2.16.1'})
@conda(libraries={'keras-cv': '0.9.0', 'tensorflow': '2.16.1'})
@step
def start(self):
import tensorflow as tf
print("tensorflow" + tf.__version__)
import keras_cv
print("keras_cv" + keras_cv.__version__)
import sys
print("Python version")
print(sys.version)
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
self.next(self.end)
@step
def end(self):
print("All done. \n\n Congratulations!\n")
return
if __name__ == '__main__':
dummy_test_pypi()freezing-vase-46551
06/21/2024, 1:40 AMfreezing-vase-46551
06/21/2024, 1:41 AMfreezing-vase-46551
06/21/2024, 1:42 AM