File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed
docs/source/user_guide/jobs/tabs Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 4949 type: python
5050 spec:
5151 conda:
52- slug: pytorch19_p37_cpu_v1
52+ slug: pytorch110_p38_cpu_v1
5353 type: service
5454 env:
5555 - name: DATASET_NAME
Original file line number Diff line number Diff line change 2626 .with_runtime(
2727 PythonRuntime()
2828 # Specify the service conda environment by slug name.
29- .with_service_conda("pytorch19_p37_cpu_v1 ")
29+ .with_service_conda("pytorch110_p38_cpu_v1 ")
3030 # The job artifact can be a single Python script, a directory or a zip file.
3131 .with_source("local/path/to/code_dir")
3232 # Environment variable
7979 - --key
8080 - arg2
8181 conda:
82- slug: pytorch19_p37_cpu_v1
82+ slug: pytorch110_p38_cpu_v1
8383 type: service
8484 entrypoint: my_package/my_script.py
8585 env:
Original file line number Diff line number Diff line change 2828 # Specify the service conda environment by slug name.
2929 .with_service_conda("pytorch110_p38_cpu_v1")
3030 # Source code of the job, can be local or remote.
31- .with_source("https://raw.githubusercontent.com/oracle-samples/oci-data-science-ai-samples/432357b123b7401ef67b116fe19aec217ca920f0/jobs/python/job%2Bsamples/greeting-env-cmd .py")
31+ .with_source("path/to/script .py")
3232 # Environment variable
3333 .with_environment_variable(NAME="Welcome to OCI Data Science.")
3434 # Command line argument
7171 env:
7272 - name: NAME
7373 value: Welcome to OCI Data Science.
74- scriptPathURI: https://raw.githubusercontent.com/oracle-samples/oci-data-science-ai-samples/432357b123b7401ef67b116fe19aec217ca920f0/jobs/python/job%2Bsamples/greeting-env-cmd .py
74+ scriptPathURI: path/to/script .py
Original file line number Diff line number Diff line change 2626 .with_runtime(
2727 ScriptRuntime()
2828 # Specify the service conda environment by slug name.
29- .with_service_conda("pytorch19_p37_cpu_v1 ")
29+ .with_service_conda("pytorch110_p38_cpu_v1 ")
3030 # The job artifact can be a single Python script, a directory or a zip file.
3131 .with_source("local/path/to/code_dir")
32+ # Environment variable
33+ .with_environment_variable(NAME="Welcome to OCI Data Science.")
34+ # Command line argument
35+ .with_argument("100 linux \" hi there\" ")
3236 # The entrypoint is applicable only to directory or zip file as source
3337 # The entrypoint should be a path relative to the working dir.
3438 # Here my_script.sh is a file in the code_dir/my_package directory
6266 kind: runtime
6367 type: script
6468 spec:
69+ args:
70+ - 100 linux "hi there"
6571 conda:
66- slug: pytorch19_p37_cpu_v1
72+ slug: pytorch110_p38_cpu_v1
6773 type: service
6874 entrypoint: my_package/my_script.sh
75+ env:
76+ - name: NAME
77+ value: Welcome to OCI Data Science.
6978 scriptPathURI: local/path/to/code_dir
7079
7180.. code-block :: python
You can’t perform that action at this time.
0 commit comments