On Sat, Dec 27, 2008 at 8:23 PM, Luiz Felipe Martins
<[email protected]> wrote:
> OK, this is what I came up with, after some trial-and error.
>
> I could not run the image for the sage notebook server. This seems to be
> because I am running the (free) VMware Server, which does not allow machines
> with more than 2 cpus (and the server runs with 4 cpus). I don't know if
> this is because my machine is using hyperthreading.

To change the number of cpus, just edit the text file "Debian 64.vmx"
and change
maxvcpus = "4"
to
maxvcpus = "2"

That's it.

> However, I was able to come up with a setup that runs the notebook server,
> and I am including a PDF with what I did. I am no expert in this stuff,
> though, so I don't know if this is flawed, or if it will work in other
> systems.
>
> The main difference between my setup and the one suggested in the
> notebook.py script given by W. Stein, is that I don't use the server_pool
> option to start the notebook server.  I assume that this causes the server to
> run under the default user for the VM, which is a privileged account, that
> can run sudo, for example. I don't know if this is a potential problem. I
> could not start the server with the server-pool option as suggested. I
> created a user called worksheet in the guest machine, but I don't know how
> to set its privileges, so I get a socket creation error.

It is a very (very!) bad idea to run a public notebook server without
using server_pool.  If you do that, then absolutely any user can
trivially delete any file (including all data that defines the
notebook server's state) by typing about 9 characters into any
worksheet.

> I only tested access to the server from the local network. I am asking a
> student to attempt to access it from the outside world.
>
> Please send me any comments, suggestions.
>
> On Thu, Dec 4, 2008 at 12:54 PM, William Stein <[email protected]> wrote:
>>
>> On Thu, Dec 4, 2008 at 9:40 AM, mhampton <[email protected]> wrote:
>> >
>> > Having taught several classes using Sage, I highly recommend setting
>> > up a server (or possibly more than one if you have a lot of
>> > students).  I tried setting up one sage instance per machine in a lab
>> > with macs, and it was a real pain to administer.  There are quite a
>> > few advantages of having a small number of servers:
>> >
>> > 1) Remote access.  In my experience students really like the option of
>> > working outside of school, and being able to pick up where they left
>> > off.  Since we don't have a nice license for student copies of
>> > mathematica, this is one area where students love Sage compared to
>> > mathematica.
>> >
>> > 2) Group work.  If you have small groups they have share worksheets if
>> > they are on the same server.  It also makes it easy for students to
>> > remotely ask questions, i.e. they can share their worksheet with you
>> > and you can troubleshoot or help from the comfort of your home or
>> > office :)
>> >
>> > 3) Easier to maintain.  If you want to upgrade the sage version, its
>> > much easier with 1-4 servers than a sage copy per machine.
>> >
>> > 4) Might be faster than a VM version, although this of course depends
>> > on hardware.
>> >
>> > I run my sage servers off of an aging mac pro (quad core 2.66 GHz with
>> > 8 GB of RAM) and a couple of linux (AMD quad-core) workstations which
>> > are also about 2-3 years old.  Each of those can handle about 20
>> > students with no problem.  If the load is spread out (i.e. not
>> > everyone in a lab at the same time) they could probably handle 30-40
>> > students each.
>>
>> Hi,
>>
>> sagenb.org is also run using a quad-core 2.66Ghz 8GB mac pro, but it
>> is run from a vmware machine running on the mac and that vmware
>> machine has only 2GB allocated to it.   Using a virtual machine has
>> advantages regarding security -- also the virtual machine makes an
>> automatic snapshot of its state once per day, and saves the last few
>> days of snapshots.
>>
>> Here's the script to run the notebook.  Note the aggressive memory and
>> other limits given by ulimit below.
>>
>> s...@sagenb:~/sagenb$ more notebook.py
>> from sage.all import *
>>
>> server_pool=['worksh...@localhost']
>>
>> notebook('sage_notebook', port=8000, accounts=True, address='sagenb.org',
>>         server_pool = server_pool, ulimit='-u 400 -v 1000000 -t
>> 3600', open_viewer=False, timeout=120, secure=False)
>>
>>
>> Also, I specifically modify the nb.sobj so that it saves state once per
>> day,
>> instead of every 6 minutes or so.  This is necessary since there are
>> several
>> thousand users, and saving state can take a noticeable amount of time.
>>
>> go to the sage_notebook directory (e.g., $HOME/.sage/sage_notebook), then
>>
>> sage: a = load('nb.sobj')
>> sage: a.conf()['save_interval'] = 24*3600
>> sage: a.save()
>>
>>  -- William
>>
>>
>> >
>> > One problem is that students tend to leave their worksheets running,
>> > which starts eating into the RAM available.  I should probably use the
>> > "timeout" option in my notebooks, which would solve that problem.
>> >
>> > I email my students the IP address and port, or tell them during
>> > class, and of course use the secure option, and I haven't had any
>> > security problems yet.  Some of my servers are on a VPN network which
>> > makes them a little more secure too.
>> >
>> > Hope that helps,
>> > M. Hampton
>> >
>> > On Dec 4, 10:59 am, "William Stein" <[email protected]> wrote:
>> >> On Thu, Dec 4, 2008 at 7:50 AM, Luiz Felipe Martins
>> >>
>> >> <[email protected]> wrote:
>> >>
>> >> > Thanks for the response and the tips. I agree. When I saw the
>> >> > notebook
>> >> > server at work
>> >> > I thought: wow, this is the way things ought to go. There's a lot of
>> >> > stuff to digest on the threads you suggested, I'll tell how I'm doing
>> >> > as I go along.
>> >>
>> >> Could you figure out if something very much like sagenb.org would
>> >> work for you?  If so, I can literally just give you a copy of
>> >> sagenb.org,
>> >> which is nothing more than a VMware virtual machine running on
>> >> the desktop in my office using VMware workstation.    I can delete all
>> >> the particular user data from sagenb.org from it, change the password,
>> >> and just give it to you (or anybody) to use.
>> >>
>> >>  -- William
>> >>
>> >>
>> >>
>> >> > BTW, I found the following in the Wiki:
>> >>
>> >> >http://wiki.sagemath.org/DanDrake/JustEnoughSageServer
>> >>
>> >> > Anybody had any experience with it?
>> >>
>> >> > On Thu, Dec 4, 2008 at 10:11 AM, kcrisman <[email protected]> wrote:
>> >>
>> >> >>> You didn't say if this is a classroom lab (so all of your students
>> >> >>> will be using
>> >> >>> Sage at once) or a math computer lab for out-of-class homework (so
>> >> >>> students
>> >> >>> will go in at random times, convenient for them). Others can answer
>> >> >>> your
>> >> >>> questions more definitively than I but I think their answer will
>> >> >>> depend on the number of
>> >> >>> students using Sage at the same time.
>> >>
>> >> >> I agree.  Marshall, you've done the computer lab situation, right -
>> >> >> any thoughts?
>> >>
>> >> >> The out-of-class-time situation definitely calls for the server, I
>> >> >> think, because otherwise people have to make that trek to the
>> >> >> computer
>> >> >> lab without any real reason.  As long as you have enough memory and
>> >> >> are able to make sure not too many students use it at once, it
>> >> >> should
>> >> >> work; there are several threads on sage-support about this, e.g.
>> >>
>> >> >> >>http://groups.google.com/group/sage-support/browse_thread/thread/6735...
>> >> >> or
>> >>
>> >> >> >>http://groups.google.com/group/sage-support/browse_thread/thread/b57c...
>> >> >> the latter one addressing the possibility of having multiple ports.
>> >>
>> >> >>> > 3. Set up a Sage Notebook server. Pros: easy for students to use,
>> >> >>> > access their work from anywhere in the world. Cons: have no idea
>> >> >>> > how
>> >> >>> > to do it. (I can get help setting up a web server, that is not
>> >> >>> > the
>> >> >>> > problem, the question is how to set up Sage and the notebook
>> >> >>> > server.
>> >> >>> > The web server, and Sage, would be running in a Ubuntu server).
>> >>
>> >> >> I agree with David on this one; I think it is the kind of thing that
>> >> >> is not too hard (Sage is pretty robust, and so is VMWare).  It will
>> >> >> take a little effort to set up - but I think not too much, and once
>> >> >> our sysadmin got it running he said even I could learn how to reset
>> >> >> it
>> >> >> in case something crashed, which is saying something.
>> >>
>> >> >> Good luck!  The notebook server aspect is a really nice feature of
>> >> >> Sage for education, because it makes things so convenient for
>> >> >> students
>> >> >> that they might actually do more than they expect... and that's a
>> >> >> good
>> >> >> thing.
>> >>
>> >> >> - kcrisman
>> >>
>> >> > --
>> >> > "The main things which seem to me important on their own account, and
>> >> > not merely as means to other things, are knowledge, art, instinctive
>> >> > happiness, and relations of friendship or affection."
>> >> >   -Bertrand Russell
>> >>
>> >> > L. Felipe Martins
>> >> > Department of Mathematics
>> >> > Cleveland State University
>> >> > [email protected]
>> >>
>> >> --
>> >> William Stein
>> >> Associate Professor of Mathematics
>> >> University of Washingtonhttp://wstein.org
>> > >
>> >
>>
>>
>>
>> --
>> William Stein
>> Associate Professor of Mathematics
>> University of Washington
>> http://wstein.org
>>
>>
>
>
>
> --
> "The main things which seem to me important on their own account, and not
> merely as means to other things, are knowledge, art, instinctive happiness,
> and relations of friendship or affection."
>   -Bertrand Russell
>
> L. Felipe Martins
> Department of Mathematics
> Cleveland State University
> [email protected]
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to