Giter Club home page Giter Club logo

lsw2-virtual-machine's Introduction

Virtualizing LSW

You must install [podman](https://podman.io/_ first, at least version 4.3.1 On a mac I use MacPorts

sudo port install podman

Initialize the podman machine

If you already have a podman virtual machine, delete it with

podman machine rm podman-machine-default

then

make init

This starts up a podman machine with more oomph than the default: 16G ram and 8 CPUs, "rootful"

You will need to start up a podman machine, and again each time you reboot:

podman machine start

Build the image

make build

Takes a few minutes

Run the image

To run LSW and interact with a repl

make run

You will be put into a shell. Run ./lsw and wait for the prompt.

Checkpoint

Checkpoint saves the state of a running LSW. In a separate shell (not the one running LSW)

make checkpoint

This will quit the running LSW

Resume a checkpoint

make resume

Hit return to get the repl prompt.

Start over

Assuming you aren't running the container,

podman container prune 

This will delete the checkpoint.

Instructions below are out of date

Will be updated once I verify I can run slime

Inside emacs

To run LSW from docker image inside your local emacs:

(setq slime-docker-implementations '((lsw ("/home/lsw/repos/lsw2/bin/lsw") :image-name "lsw2/lisp")))
  • add slime-tramp as one of your slime-contribs

Run it with M-x slime-docker

This is relatively new tech for me. Please contact me if try but have trouble with these instructions.

Notes

    brew install socat
    socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"&  # (do that only once per login session)

in .emacs

(setq slime-docker-implementations `((lsw ("/home/lsw/repos/lsw2/bin/lsw") :image-name "lsw2/lisp" :env (("DISPLAY" . ,(concat (get-ip-address) ":0"))))))

I added the below definition of get-ip-address to my .emacs, which seems to work. YMMV

(defun get-ip-address ()
   (substring (shell-command-to-string
       "ifconfig | grep 'inet ' | grep -v 127.0.0.1 | head -1 | sed 's/.*inet \\(\\([0-9\\.]\\)*\\).*/\\1/'")
	     0 -1))

Of note

The CRaC (Coordinated Restore at Checkpoint) Project researches coordination of Java programs with mechanisms to checkpoint (make an image of, snapshot) a Java instance while it is executing. Restoring from the image could be a solution to some of the problems with the start-up and warm-up times. The primary aim of the Project is to develop a new standard mechanism-agnostic API to notify Java programs about the checkpoint and restore events. Other research activities will include, but will not be limited to, integration with existing checkpoint/restore mechanisms and development of new ones, changes to JVM and JDK to make images smaller and ensure they are correct.

https://github.com/CRaC https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md

lsw2-virtual-machine's People

Contributors

alanruttenberg avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.