You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/12/21 06:57:00 UTC

[GitHub] [dolphinscheduler-sdk-python] jieguangzhou opened a new issue, #59: [impv] Auto create the whole task workspace to keep the task run same workspace in the local system and the dolphinscheduler platform

jieguangzhou opened a new issue, #59:
URL: https://github.com/apache/dolphinscheduler-sdk-python/issues/59

   For example, If I have the workspace like this: https://github.com/pytorch/examples/tree/main/word_language_model
   <img width="245" alt="image" src="https://user-images.githubusercontent.com/31528124/208839497-c82b4cac-06b3-4c4f-81bf-4c727b4402c7.png">
   
   We can submit the task
   ```python
   # [start workflow]
   from pydolphinscheduler.core import Workflow
   from pydolphinscheduler.core.resource import Resource, LocalResource
   from pydolphinscheduler.tasks import Shell
   
   with Workflow(
       name="auto_resources_example",
   ) as workflow:
       # [start use_exists_resources]
       task_use_resource = Shell(
           name="example",
           command=f"python main.py --cuda",
           auto_resource=True
       )
       # [end use_exists_resources]
   
       workflow.run()
   # [end workflow]
   ```
   
   Then, all the files will be uploaded to the resource center.
   And there are other best ways to track the file version, If this is the git repository, we only record the git repository, version, and diff.
   Then, we can reproduce the workspace in dolphinscheduler. (Inspired by ClearML)
   So, After developing a project locally, we can directly submit it to DolphinScheduler and run it directly. Except for some inconsistent environment variables.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org