ERROR: The 'run' command is only supported from within a workspace.

2,523 views
Skip to first unread message

Arturo Calvo

unread,
Oct 31, 2016, 7:58:59 AM10/31/16
to Magenta Discuss
I just installed the development environment for Magenta. When I run the following commands:

BUNDLE_PATH=/home/arturo/Downloads/basic_rnn.mag
CONFIG
=basic_rnn


bazel run
//magenta/models/melody_rnn:melody_rnn_generate -- --config=${CONFIG} --bundle_file=${BUNDLE_PATH} --output_dir=/tmp/melody_rnn/generated --num_outputs=10 --num_steps=128 --primer_melody="[60]"

I get error message:

The 'run' command is only supported from within a workspace.

What is wrong? I tried to install magenta environment as well (not development version) and when I run

source magenta activate

BUNDLE_PATH
=/home/arturo/Downloads/basic_rnn.mag
CONFIG
=basic_rnn

melody_rnn_generate
\
--config=${CONFIG} \
--bundle_file=${BUNDLE_PATH} \
--output_dir=/tmp/melody_rnn/generated \
--num_outputs=10 \
--num_steps=128 \
--primer_melody="[60]"

I get error: 
melody_rnn_generate: command not found



Brannon Dorsey

unread,
Oct 31, 2016, 11:15:19 AM10/31/16
to Arturo Calvo, Magenta Discuss
Are you running the bazel run command from a directory in or below the Magenta project root?

--
Magenta project: magenta.tensorflow.org
To post to this group, send email to magenta...@tensorflow.org
To unsubscribe from this group, send email to magenta-discuss+unsubscribe@tensorflow.org
---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discuss+unsubscribe@tensorflow.org.



--

Arturo Calvo

unread,
Oct 31, 2016, 1:31:32 PM10/31/16
to Magenta Discuss, arturoca...@gmail.com
Thanks for your response. That was the issue and seems to be working fine.
Regarding the second part (running it from the magenta non-development environtment), do you know what the problem is?

Thanks
To unsubscribe from this group, send email to magenta-discu...@tensorflow.org

---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discu...@tensorflow.org.



--

Brannon Dorsey

unread,
Oct 31, 2016, 1:36:39 PM10/31/16
to Arturo Calvo, Magenta Discuss
No problem :) As for the non-dev magenta environment, what method did you use to install magenta (the automated install w/ the script provided or the manual install)? If you did manual, did you make sure to "pip install magenta" while inside of the correct conda environment (named "magenta")? Also what OS are you running?

To unsubscribe from this group, send email to magenta-discuss+unsubscribe@tensorflow.org

---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discuss+unsubscribe@tensorflow.org.



--

Arturo Calvo Devesa

unread,
Oct 31, 2016, 2:03:47 PM10/31/16
to Brannon Dorsey, Magenta Discuss
Thanks Brannon! I installed it using:

My OS is Ubuntu 15.04.

Brannon Dorsey

unread,
Oct 31, 2016, 2:18:30 PM10/31/16
to Arturo Calvo Devesa, Magenta Discuss
I wasn't able to get the install.sh script to work, but just reading over it it seems like it should be working for you and it is strange that it is not. You do have a magenta conda environment then correct ("source magenta activate" doesn't error right? And from there you can check your current env with "conda info --envs"). I installed conda with miniconda so my conda folder with all of my environments is in $HOME/miniconda2/. For me, melody_rnn_generate is in $HOME/minidonda2/envs/magenta/bin. Do you see the magenta scripts in your equivalent folder? If not, what do you see there?

Gabriella Fabwen

unread,
Oct 31, 2016, 2:25:26 PM10/31/16
to Magenta Discuss
Hello all,

I came across the same problem with magenta command not found. I posted this issue on stackoverflow as asked, because this is not supposed to be a help forum, but anyway... Here is the post:

www.stackoverflow.com/questions/40337737/bash-melody-rnn-generate-command-not-found

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Arturo Calvo Devesa

unread,
Oct 31, 2016, 3:06:38 PM10/31/16
to Brannon Dorsey, Magenta Discuss
Hi Brannon,

That's interesting. In the equivalent folder ($HOME/Apps/anaconda3/envs/magenta/bin) I see:
2to3  deactivate    openssl  python2    sqlite3
activate  easy_install    pip      python2.7    tclsh8.5
conda  easy_install-2.7  pydoc    python-config  wheel
c_rehash  idle    python   smtpd.py    wish8.5

No magenta scripts...

Brannon Dorsey

unread,
Oct 31, 2016, 3:12:07 PM10/31/16
to Magenta Discuss, bra...@brannondorsey.com
Hm... No tensorflow or jupyter either. Try activating your magenta environment with conda and then installing tensorflow, jupyter, and magenta with:

# Install tensorflow
TF_BINARY_URL
="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc0-cp27-none-linux_x86_64.whl"
pip install --ignore-installed --upgrade $TF_BINARY_URL

# Install other dependencies
pip install jupyter magenta

Arturo Calvo Devesa

unread,
Oct 31, 2016, 3:16:54 PM10/31/16
to Brannon Dorsey, Magenta Discuss
It is working perfectly now! Thanks a million Brannon.

Arturo

To unsubscribe from this group, send email to magenta-discuss+unsubscribe@tensorflow.org

---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discuss+unsubscribe@tensorflow.org.

Brannon Dorsey

unread,
Oct 31, 2016, 4:47:24 PM10/31/16
to Arturo Calvo Devesa, Magenta Discuss
No problem Arturo, glad you were able to get Magenta up and running :)

Gabriella, would this solution perhaps work for you as well?

Gabriella Fabwen

unread,
Oct 31, 2016, 6:26:03 PM10/31/16
to Magenta Discuss, arturoca...@gmail.com
Hello Brannon,

No, I am using a Mac.
Reply all
Reply to author
Forward
0 new messages