mirror of
https://github.com/trycua/computer.git
synced 2026-01-03 12:00:00 -06:00
Added working Ubuntu XFCE container
This commit is contained in:
37
libs/kasm/Dockerfile
Normal file
37
libs/kasm/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
FROM kasmweb/core-ubuntu-jammy:1.17.0
|
||||
USER root
|
||||
|
||||
ENV HOME=/home/kasm-default-profile
|
||||
ENV STARTUPDIR=/dockerstartup
|
||||
ENV INST_SCRIPTS=$STARTUPDIR/install
|
||||
WORKDIR $HOME
|
||||
|
||||
######### Customize Container Here ###########
|
||||
|
||||
# Installing python, pip, and libraries
|
||||
RUN apt-get update
|
||||
RUN apt install -y wget build-essential libncursesw5-dev libssl-dev \
|
||||
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
|
||||
RUN add-apt-repository ppa:deadsnakes/ppa
|
||||
RUN apt install -y python3.11 python3-pip python3-tk python3-dev \
|
||||
gnome-screenshot wmctrl ffmpeg socat xclip
|
||||
|
||||
RUN pip install cua-computer-server
|
||||
|
||||
# Disable SSL requirement
|
||||
RUN sed -i 's/require_ssl: true/require_ssl: false/g' /usr/share/kasmvnc/kasmvnc_defaults.yaml
|
||||
RUN sed -i 's/-sslOnly//g' /dockerstartup/vnc_startup.sh
|
||||
|
||||
# Running the python script on startup
|
||||
RUN echo "/usr/bin/python3 -m computer_server" > $STARTUPDIR/custom_startup.sh \
|
||||
&& chmod +x $STARTUPDIR/custom_startup.sh
|
||||
|
||||
######### End Customizations ###########
|
||||
|
||||
RUN chown 1000:0 $HOME
|
||||
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
||||
ENV HOME=/home/kasm-user
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
|
||||
|
||||
USER 1000
|
||||
31
libs/kasm/README.md
Normal file
31
libs/kasm/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Kasm Cua Container
|
||||
|
||||
Containerized virtual desktop for Computer-Using Agents (CUA).
|
||||
|
||||
## Usage
|
||||
|
||||
Building the container:
|
||||
|
||||
```bash
|
||||
docker build -t kasm-cua .
|
||||
```
|
||||
|
||||
Running the container:
|
||||
```bash
|
||||
docker run --rm -it --shm-size=512m -p 6901:6901 -p 8000:8000 -e VNC_PW=password kasm-cua
|
||||
```
|
||||
A VNC client will be available at `localhost:6901` with the username `kasm-user` and password `password`.
|
||||
|
||||
The container will run a Computer Server instance in the background. You can access the Computer Server API at `http://localhost:8000` or using the cua Computer SDK.
|
||||
|
||||
## Creating a snapshot
|
||||
|
||||
You can create a snapshot of the container at any time by running:
|
||||
```bash
|
||||
docker commit <container_id> kasm-cua-snapshot
|
||||
```
|
||||
|
||||
You can then run the snapshot by running:
|
||||
```bash
|
||||
docker run --rm -it --shm-size=512m -p 6901:6901 -p 8000:8000 -e VNC_PW=password kasm-cua-snapshot
|
||||
```
|
||||
Reference in New Issue
Block a user