Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

using --init returns: sh: 1: source: not found #39

Open
itsayellow opened this issue Mar 25, 2019 · 5 comments
Open

using --init returns: sh: 1: source: not found #39

itsayellow opened this issue Mar 25, 2019 · 5 comments

Comments

@itsayellow
Copy link

The --init option tries to run a script using "source" but this fails on the remote machine with the message "sh: 1: source: not found".

It appears the shell on at least one remote Gradient machine (K80) and possibly more does not use "source" to source input scripts. I'm assuming it needs the "." to source instead.

I did try to fix this (unsuccessfully) in my own copy of the paperspace-python package, using the "." The remote shell then did understand it was meant to source the file, but for some reason it couldn't find init.sh even though it was in my workspace. I'm not quite sure why that would be.

@BartoszCki
Copy link
Contributor

@itsayellow Can you confirm the issue still exists?

@itsayellow
Copy link
Author

Still broken, but now in a different way.

Now it says that my init script is not found. I verified that it is properly in the 'Files' section of my job on the paperspace web console, and that it works locally.

birchtree:test$ paperspace-python run test.py --init test2.sh --machineType G1 --workspace .
New jobId: jsg40e8rswx940
Cluster: PS Jobs on GCP
Job Pending
Waiting for job to run...
Awaiting logs...
sh: 1: .: test2.sh: not found
Job Failed, exitCode 2

test2.sh:

echo Hello bash!

test.py:

#!/usr/bin/env python3

print("Hello python!")

@itsayellow
Copy link
Author

Is this sourcing from a different directory somehow than the workspace directory?

@mkulaczkowski
Copy link
Contributor

@BartoszCki

@BartoszCki
Copy link
Contributor

Thanks for reminder @mkulaczkowski

@itsayellow this functionality is being refactored and this issue should be resolved in 0.2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants