They can't even make this basic stuff just work!
As of December 2023 on a
t2.micro instance, the only one part of free tier at the time with advertised 1 vCPU, 1 GiB RAM, 8 GiB disk for the first 12 months, on Ubuntu 22.04:$ free -h
total used free shared buff/cache available
Mem: 949Mi 149Mi 210Mi 0.0Ki 590Mi 641Mi
Swap: 0B 0B 0B
$ nproc
1
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.6G 1.8G 5.8G 24% /To install software:
sudo apt update
sudo apt install cowsay
cowsay asdfAs of December 2023, the cheapest instance with an Nvidia GPU is g4nd.xlarge, so let's try that out. In that instance, lspci contains:so we see that it runs a Nvidia T4 GPU.
00:1e.0 3D controller: NVIDIA Corporation TU104GL [Tesla T4] (rev a1)Be careful not to confuse it with g4ad.xlarge, which has an AMD GPU instead. TODO meaning of "ad"? "a" presumably means AMD, but what is the "d"?
Some documentation on which GPU is in each instance can seen at: docs.aws.amazon.com/dlami/latest/devguide/gpu.html (archive) with a list of which GPUs they have at that random point in time. Can the GPU ever change for a given instance name? Likely not. Also as of December 2023 the list is already outdated, e.g. P5 is now shown, though it is mentioned at: aws.amazon.com/ec2/instance-types/p5/
When selecting the instance to launch, the GPU does not show anywhere apparently on the instance information page, it is so bad!
Also note that this instance has 4 vCPUs, so on a new account you must first make a customer support request to Amazon to increase your limit from the default of 0 to 4, see also: stackoverflow.com/questions/68347900/you-have-requested-more-vcpu-capacity-than-your-current-vcpu-limit-of-0, otherwise instance launch will fail with:
You have requested more vCPU capacity than your current vCPU limit of 0 allows for the instance bucket that the specified instance type belongs to. Please visit aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.
When starting up the instance, also select:Once you finally managed to SSH into the instance, first we have to install drivers and reboot:and now running:shows something like:
- image: Ubuntu 22.04
- storage size: 30 GB (maximum free tier allowance)
sudo apt update
sudo apt install nvidia-driver-510 nvidia-utils-510 nvidia-cuda-toolkit
sudo rebootnvidia-smi+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 |
| N/A 25C P8 12W / 70W | 2MiB / 15360MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+If we start from the raw Ubuntu 22.04, first we have to install drivers:
- docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html official docs
- stackoverflow.com/questions/63689325/how-to-activate-the-use-of-a-gpu-on-aws-ec2-instance
- askubuntu.com/questions/1109662/how-do-i-install-cuda-on-an-ec2-ubuntu-18-04-instance
- askubuntu.com/questions/1397934/how-to-install-nvidia-cuda-driver-on-aws-ec2-instance
From there basically everything should just work as normal. E.g. we were able to run a CUDA hello world just fine along:
nvcc inc.cu
./a.outOne issue with this setup, besides the time it takes to setup, is that you might also have to pay some network charges as it downloads a bunch of stuff into the instance. We should try out some of the pre-built images. But it is also good to know this pristine setup just in case.
We then managed to run Ollama just fine with:which gave:so way faster than on my local desktop CPU, hurray.
curl https://ollama.ai/install.sh | sh
/bin/time ollama run llama2 'What is quantum field theory?'0.07user 0.05system 0:16.91elapsed 0%CPU (0avgtext+0avgdata 16896maxresident)k
0inputs+0outputs (0major+1960minor)pagefaults 0swapsAfter setup from: askubuntu.com/a/1309774/52975 we were able to run:which gave:so only marginally better than on P14s. It would be fun to see how much faster we could make things on a more powerful GPU.
head -n1000 pap.txt | ARGOS_DEVICE_TYPE=cuda time argos-translate --from-lang en --to-lang fr > pap-fr.txt77.95user 2.87system 0:39.93elapsed 202%CPU (0avgtext+0avgdata 4345988maxresident)k
0inputs+88outputs (0major+910748minor)pagefaults 0swapsThe Neovius surface refers to a specific type of mathematical surface that has properties useful in the study of differential geometry and topology. It is named after the Finnish mathematician A.F. Neovius, who studied the surface and its properties. The Neovius surface is typically characterized by its complex structure, including features like cusps and self-intersections, making it interesting from the perspectives of both geometry and mathematical physics.
Supergeometry is a branch of mathematics that extends the concepts of geometry to include both geometric structures and "supersymmetrical" objects, which involve odd or "fermionic" dimensions. It arises from the study of supersymmetry in theoretical physics, where it plays a crucial role in string theory and quantum field theory. In conventional geometry, one typically works with spaces that are defined by traditional notions of points and curves in even-dimensional Euclidean spaces.
Synthetic Differential Geometry (SDG) is a branch of mathematics that provides a framework for differential geometry using a synthetic or categorical approach, rather than relying on traditional set-theoretic and analytical foundations. This approach is particularly notable for its use of "infinitesimals," which are small quantities that can be treated algebraically in a way that is similar to how they are used in non-standard analysis.
The term "tangential angle" can refer to different concepts depending on the context, but it generally relates to the angle formed by a tangent line to a curve or surface. Here are a couple of specific interpretations: 1. **In Geometry**: The tangential angle can refer to the angle between a tangent line (a line that just touches a curve at a single point) and the horizontal axis (or another reference line).
The Disc theorem is a concept in complex analysis and deals with the behavior of holomorphic functions. Specifically, it is related to the area of function theory. While there are various formulations and different contexts in which the term "Disc theorem" might be used, one specific interpretation often referenced involves properties related to holomorphic functions defined on the unit disk in the complex plane.
The Generalized Stokes' Theorem is a fundamental result in differential geometry and vector calculus that extends the classical Stokes' theorem, relating integrals of differential forms over manifolds to their behavior on the boundaries of those manifolds. It serves as a powerful tool in various fields such as physics, engineering, and mathematics, particularly in the study of differential forms, topology, and manifold theory.
The Kervaire invariant is a concept in algebraic topology, specifically in the study of bordism theory and the classification of high-dimensional manifolds. It is named after the mathematician Michel Kervaire, who introduced it in the context of differentiable manifolds. More formally, the Kervaire invariant is a specific invariant associated with a smooth manifold, particularly focusing on the topology of the manifold's tangent bundle.
In the context of differential geometry and complex analysis, a **complex geodesic** typically refers to a generalization of the concept of a geodesic in the realm of complex manifolds or complex spaces. The classical notion of a geodesic is a curve that is locally a distance minimizer between points in a given space. In Riemannian geometry, geodesics are trajectories that exhibit extremal properties (typically, minimizing lengths) in a curved space.
Static spacetime is a concept in general relativity that refers to a type of spacetime geometry that is both time-independent (static) and has a specific symmetry. More formally, a static spacetime is one where the gravitational field does not change over time and exhibits certain symmetries, particularly time translation symmetry and spatial symmetry. Key characteristics of static spacetimes include: 1. **Time Independence**: The metric tensor, which describes the geometry of spacetime, does not vary with time.
Serge Rudaz is a philosopher, filmmaker, and writer known for his contributions to discussions on philosophy, ethics, and the intersection of these fields with cinematic narratives. His work often explores the impact of media on societal values and individual perception.
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 3. Visual Studio Code extension installation.Figure 4. Visual Studio Code extension tree navigation.Figure 5. Web editor. You can also edit articles on the Web editor without installing anything locally.Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.Video 4. OurBigBook Visual Studio Code extension editing and navigation demo. Source. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact





