berkeley-cs162 / vagrant Goto Github PK
View Code? Open in Web Editor NEWThe Vagrant Virtual Machine for CS 162 students.
The Vagrant Virtual Machine for CS 162 students.
I met this git issue that said
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
when trying to access my private cs162 git repo within the vagrant box and I have set up a id_rsa key on the host machine. But the problem is I how two id_rsa
in my .ssh
dir for my two different github account. But it seems like the vagrant box didn't forward the right one. Is there a way to update the vagrant file so that we can forward a specific id_rsa key to use?
I have had various issues (described later) with provisioning VMs using the existing Puppet method. If you have confidence in the Docker image,1 as it seems you do, there is a different approach you can take which I find very elegant:
I spent over a week in compute just provisioning the VM, and had various issues at various stages on various machines.4 This effort would no longer be necessary.
i.e., you think containerization is enough and you don't need a dedicated VM ↩
You can also keep the existing Puppet provisioner and leave the current approach as a backup, though the remainder of this document3 suggests that this is not necessary. ↩
162 can use their privileged account to start the Docker daemon and run the containers as non-root on behalf of the student, so that student the attaches to an existing container. 162 can run their own x86 VMs (say, within an instructional machine). Students can use a free instance on Oracle Cloud. Students can work directly on the instructional machines as they are doing now. ↩ ↩2
One particularly terrible issue that occurs on only some of my machines is that the provisioning makes the machine extremely slow (ls
in home dir takes 20 seconds and new ssh connections can't be established). And the build gets stuck at the stage after matplotlib
. ↩
Solution: merge main into cloud-setup
Currently build times are ~30 minutes using puppet. We can optimize this by utilizing docker staged builds which cache results of building programs. A new repo for this project should be created.
Hi,
I used the vagrant to build the virtual machine, when I try command pintos run, the system threw an error like pintos can not be found. I also try to update the PATH variable, but the $HOME/.bin does not exist. Could anyone give me some help? Thank you.
The current Docker image is huge—even with recent optimizations (#13, #16), it is around 3.9 GB!
Part of why is just that it has so many packages. But part of why is that it is oriented around the existing Puppet provisioner, which isn't amenable to the types of optimizations that container images are.
For example, it is a lot easier in a Dockerfile to initiate an install of some software, and then copy over only the relevant portions (leaving behind caches and even parts of the program which will never be used). You can download each dependency in a parallel stage, and selectively copy it over to the final image, dramatically improving performance of builds and rebuilds. Better, you can copy the software directly from prebuilt official images; the software providers have done the hard work of isolating the necessary components, and the software is already built.
Intentionally optimizing for containerized loads might be worthwhile. This is best done together with #17; see that issue for the general strategy, as well as other suggestions such as slim versions.1
But with a lot more work, it is also possible to rewrite the Dockerfile
so that it completely bypasses Puppet, while still having students use Puppet in a VM. ↩
From a student:
When I tried running 'pintos run alarm-multiple' I got an error stating squish-pty couldn't be executed (cannot execute binary file: Exec format error). To fix this, I went into /home/vagrant/.bin and ran 'gcc squish-pty.c -o squish-pty'. I did this because the error message suggested that squish-pty had been compiled for a 64-bit arch. After this, 'pintos run alarm-multiple' worked fine and ran all the tests.
I just wanted to let the staff know about this in case the provisioner should be modified to build squish-pty from source during provisioning.
I tried downloading this repo and running vagrant up. I get the following output.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown 'enp0s8' || true
/sbin/ip addr flush dev 'enp0s8'
# Remove any previous network modifications from the interfaces file
sed -e '/^#VAGRANT-BEGIN/,$ d' /etc/network/interfaces > /tmp/vagrant-network-interfaces.pre
sed -ne '/^#VAGRANT-END/,$ p' /etc/network/interfaces | tac | sed -e '/^#VAGRANT-END/,$ d' | tac > /tmp/vagrant-network-interfaces.post
cat \
/tmp/vagrant-network-interfaces.pre \
/tmp/vagrant-network-entry \
/tmp/vagrant-network-interfaces.post \
> /etc/network/interfaces
rm -f /tmp/vagrant-network-interfaces.pre
rm -f /tmp/vagrant-network-entry
rm -f /tmp/vagrant-network-interfaces.post
/sbin/ifup 'enp0s8'
Stdout from the command:
Stderr from the command:
bash: line 5: /sbin/ifdown: No such file or directory
bash: line 21: /sbin/ifup: No such file or directory
To Fix:
After running vagrant up
run
vagrant ssh
sudo apt-get install ifupdown
Reload the VM.
I do not know if we can install this beforehand to avoid this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.