[yt-users] installing yt behind a firewall
Luigi Iapichino
luigi at ita.uni-heidelberg.de
Thu Apr 28 06:22:18 PDT 2011
On Thursday 28 April 2011, Wolfram Schmidt wrote:
> Hi everyone,
>
> perhaps, others also have encountered the situation of having to install
> yt on a machine with tight security measures that do not allow access to
> the internet through its firewall.
>
> An awkward, yet doable workaround is to mount the installation directory
> via sshfs on a machine outside the firewall (let's call it machine B) to
> download the required packages and to execute everything else on machine
> A behind the firewall.
>
> With the most recent yt version, I encountered a problem once the
> installation of Python was completed. Going back to machine B to
> download the yt distribution, I found that the previously installed hg
> wouldn't work. The last lines of the installation log (see attachment)
> show that hg, running on machine B, attempts to use Python under the
> path that applies to machine A (/home/hlrb2/pr47bi/lu78tar3/yt/...
> instead of /home/raid2/schmidt/hlrb2/yt/...), athough I set DEST_DIR to
> the (sshfs-mounted) path that applies to machine B. What should I do
> about that?
>
> Cheers,
> Wolfram
Hi Wolfram,
if this is the same problem that I also had with mercurial (within the same
framework you described), you should set INST_HG=0 in your script and change
the lines
if [ $INST_HG -eq 1 ]
then
echo "Installing Mercurial."
do_setup_py mercurial-1.8.1
export HG_EXEC=${DEST_DIR}/bin/hg
else
# We assume that hg can be found in the path.
if type -P hg &>/dev/null
then
export HG_EXEC=hg
else
echo "Cannot find mercurial. Please set INST_HG=1."
do_exit
fi
fi
into
if [ $INST_HG -eq 1 ]
then
echo "Installing Mercurial."
do_setup_py mercurial-1.8.1
export HG_EXEC=${DEST_DIR}/bin/hg
else
# We assume that hg can be found in the path.
# if type -P hg &>/dev/null
# then
export HG_EXEC=hg
# else
# echo "Cannot find mercurial. Please set INST_HG=1."
# do_exit
# fi
fi
In this way, the script will not complain if it does not find hg (which is
always the case on machine A, but you don't care), while everything will go
smooth on machine B.
Hope this helps!
Cheers,
Luigi
--
---------------------------------------------------------------
Luigi Iapichino
Zentrum fuer Astronomie der Universitaet Heidelberg
Institut fuer Theoretische Astrophysik
Albert-Ueberle-Str. 2, D-69120 Heidelberg, Germany
Tel: +49 6221 548983, Fax: +49 6221 544221
e-mail: luigi at ita.uni-heidelberg.de
URL: http://www.ita.uni-heidelberg.de/~luigi/
More information about the yt-users
mailing list