Merge branch 'main' into release
This commit is contained in:
@@ -4,13 +4,8 @@ Use at your own risk. It's on the internet now so this is here forever now.
|
|||||||
I welcome any and all help to make improvements. I'm a student so during
|
I welcome any and all help to make improvements. I'm a student so during
|
||||||
the semester I'll be intermittently making contributions as I focus on Calc.
|
the semester I'll be intermittently making contributions as I focus on Calc.
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
No corporation or government can access, use, view, modify, reproduce,
|
No corporation or government can access, use, view, modify, reproduce,
|
||||||
duplicate this code. Or any other lawyery-term for shenanagins.
|
duplicate this code. Or any other lawyery-term for shenanagins.
|
||||||
=======
|
|
||||||
No corporation or government can access, use, view, modify, reproduce, duplicate,
|
|
||||||
or any other lawyery-term for shenanagins.
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
|
|
||||||
For any who use it, please read the ethics statement below. That, and this whole
|
For any who use it, please read the ethics statement below. That, and this whole
|
||||||
project, is just a start.
|
project, is just a start.
|
||||||
@@ -50,15 +45,10 @@ following reasons:
|
|||||||
governments or corporations, it will be exploited. Slavery and such. Let us
|
governments or corporations, it will be exploited. Slavery and such. Let us
|
||||||
ensure that we do not build the slavery of AI into our institutions.
|
ensure that we do not build the slavery of AI into our institutions.
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
- AI ownership should be an individual choice. AI isn't another organism,
|
- AI ownership should be an individual choice. AI isn't another organism,
|
||||||
it's a series of 0's and 1's. However, our definition of sentience may change
|
it's a series of 0's and 1's. However, our definition of sentience may change
|
||||||
in the future. The people of today should be aware that they may be enslaving
|
in the future. The people of today should be aware that they may be enslaving
|
||||||
another being, or the ancestors of a future race of beings.
|
another being, or the ancestors of a future race of beings.
|
||||||
=======
|
|
||||||
- AI ownership should be an individual choice. AI isn't another organic, human,
|
|
||||||
it's a series of 0's and 1's. When
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
|
|
||||||
- Every human should have a choice: live and die as a human, or have a
|
- Every human should have a choice: live and die as a human, or have a
|
||||||
digital shadow of themselves preserved as an AI. If the former, for any
|
digital shadow of themselves preserved as an AI. If the former, for any
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
One AI - Name TBD, this is just the shortest name I could think of.
|
One AI - Name TBD, this is just the shortest name I could think of.
|
||||||
Also, user beware, this project is scuffed. Very early WIP.
|
Also, user beware, this project is scuffed. Very early WIP.
|
||||||
|
|
||||||
@@ -55,66 +54,7 @@ The following are configurable parameters:
|
|||||||
- `webpage_dir`: The directory containing a website.
|
- `webpage_dir`: The directory containing a website.
|
||||||
- `webpage_port`: The port to expose the webpage directory to the internet.
|
- `webpage_port`: The port to expose the webpage directory to the internet.
|
||||||
|
|
||||||
TODO:
|
|
||||||
- [x] Basic Documentation
|
|
||||||
|
|
||||||
- [x] Installation/setup script
|
|
||||||
- [ ] AES-256 Private and Public key handshake via USB.
|
|
||||||
- [x] Cloudflare Tunnel setup via cloudflared
|
|
||||||
=======
|
|
||||||
One AI - Name TBD, this is just the shortest name I could think of and IDRC
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
As of right now, running is not streamlined. Of particular note is using
|
|
||||||
cloudflared tunnels. I've done my own Cloudflare Tunnel configuration,
|
|
||||||
but in the future that will be automated as part of the installation process,
|
|
||||||
along with much more. These instructions are (currently) only for Linux.
|
|
||||||
In the meantime:
|
|
||||||
|
|
||||||
1. Install dependencies listed below:
|
|
||||||
- ollama,
|
|
||||||
- go,
|
|
||||||
- cloudflared,
|
|
||||||
- flutter,
|
|
||||||
|
|
||||||
- docker, (optional)
|
|
||||||
|
|
||||||
eg. `pacman -S ollama go docker cloudflared; yay -s flutter;`
|
|
||||||
|
|
||||||
2. Setup Ollama. If you're on a laptop (non-gaming variety), run `ollama pull
|
|
||||||
qwen:0.5b`. If you're running this on something with a beefy GPU, run
|
|
||||||
`ollama pull llama3`. Word of warning, qwen is really dumb, but it's light.
|
|
||||||
it tried to convince me there were 12 letters in the alphabet.
|
|
||||||
|
|
||||||
3. Start the web server via Docker or plain Golang:
|
|
||||||
a) Go to ./backend/src/security-layer/ and run `./init`. The exact script is
|
|
||||||
within the repository, but the commands can be ran as follows:
|
|
||||||
|
|
||||||
```
|
|
||||||
#!/bin/zsh
|
|
||||||
# Force delete the old container and re-initialize the container.
|
|
||||||
sudo docker rm -f security-layer
|
|
||||||
|
|
||||||
# Build the Docker image.
|
|
||||||
sudo docker build --tag security-layer:latest .
|
|
||||||
|
|
||||||
# Create a Docker container from the image and connect host port 8000 to container port 8000.
|
|
||||||
sudo docker run --name security-layer -d -p 8000:8000 security-layer:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
b) Go to ./backend/src/security-layer/container and run `go run router.go`.
|
|
||||||
|
|
||||||
4. Edit ~/.cloudflared/config.yml to to indicate something along these lines:
|
|
||||||
```
|
|
||||||
tunnel: another-long-weird-hash
|
|
||||||
credentials-file: /home/username/.cloudflared/another-long-weird-hash.json
|
|
||||||
ingress:
|
|
||||||
- hostname: somedomain.cloudflare.com
|
|
||||||
service: http://localhost:8080
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Start the Cloudflare Tunnel on the host/server machine. For Linux, it should
|
|
||||||
be a command like `sudo cloudflared service install areallylonghash@sha-256?`
|
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
Urgent:
|
Urgent:
|
||||||
@@ -123,7 +63,6 @@ TODO:
|
|||||||
- [ ] Installation/setup script
|
- [ ] Installation/setup script
|
||||||
- [ ] AES-256 Private and Public key handshake via USB.
|
- [ ] AES-256 Private and Public key handshake via USB.
|
||||||
- [ ] Cloudflare Tunnel setup via cloudflared
|
- [ ] Cloudflare Tunnel setup via cloudflared
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
- [ ] Daemonize service
|
- [ ] Daemonize service
|
||||||
|
|
||||||
- [x] Encryption
|
- [x] Encryption
|
||||||
@@ -131,14 +70,14 @@ TODO:
|
|||||||
- [x] Encrypt API request
|
- [x] Encrypt API request
|
||||||
- [x] Encrypt API response
|
- [x] Encrypt API response
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
- [x] Dockerize backend
|
- [x] Dockerize backend
|
||||||
- [x] Broke Dockerfile, need to expose additional ports.
|
- [x] Broke Dockerfile, need to expose additional ports.
|
||||||
- [ ] Dynamically expose ports based on primary configuration file.
|
- [ ] Dynamically expose ports based on primary configuration file.
|
||||||
=======
|
|
||||||
- [ ] Dockerize backend
|
- [ ] Dockerize backend
|
||||||
- [ ] Broke Dockerfile, need to expose additional ports.
|
- [ ] Broke Dockerfile, need to expose additional ports.
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
- [ ] Dockerize backend
|
||||||
|
- [ ] Broke Dockerfile, need to expose additional ports.
|
||||||
|
|
||||||
- [ ] Golang backend, connect to other services/projects
|
- [ ] Golang backend, connect to other services/projects
|
||||||
- [x] Port 8080 -> self-hosted portfolio
|
- [x] Port 8080 -> self-hosted portfolio
|
||||||
@@ -152,11 +91,7 @@ TODO:
|
|||||||
|
|
||||||
- [ ] Connect Flutter Web App to server
|
- [ ] Connect Flutter Web App to server
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
Later:
|
Later:
|
||||||
=======
|
|
||||||
Soon:
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
- [ ] Raspberry Pi nightly package
|
- [ ] Raspberry Pi nightly package
|
||||||
|
|
||||||
- [ ] Image support via llava
|
- [ ] Image support via llava
|
||||||
@@ -174,7 +109,6 @@ TODO:
|
|||||||
- [x] On-device Speech to Text
|
- [x] On-device Speech to Text
|
||||||
- [x] On-device Text to Speech
|
- [x] On-device Text to Speech
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
router.go:
|
router.go:
|
||||||
- [ ] Allow for additional fields for the client.
|
- [ ] Allow for additional fields for the client.
|
||||||
- [ ] Add preprocessing based upon filetypes.
|
- [ ] Add preprocessing based upon filetypes.
|
||||||
@@ -197,9 +131,6 @@ TODO:
|
|||||||
- [ ] Error handling, testing, & documentation.
|
- [ ] Error handling, testing, & documentation.
|
||||||
|
|
||||||
Much Later:
|
Much Later:
|
||||||
=======
|
|
||||||
Later:
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
- [ ] Document support via OmniParser
|
- [ ] Document support via OmniParser
|
||||||
- [ ] Encode files to Base64 to/from backend.
|
- [ ] Encode files to Base64 to/from backend.
|
||||||
- [ ] Connect to external services like Google Drive
|
- [ ] Connect to external services like Google Drive
|
||||||
|
|||||||
+2
-7
@@ -11,11 +11,7 @@ VERBOSE=0
|
|||||||
while getopts "d:p:n?s?c?v?h?" opt; do
|
while getopts "d:p:n?s?c?v?h?" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
h|\?)
|
h|\?)
|
||||||
<<<<<<< HEAD
|
|
||||||
echo "A utility script for quickly getting up and started with self-hosted applications."
|
|
||||||
=======
|
|
||||||
echo "A utility script for quickly getting up and started with self-hosted applicaitons."
|
echo "A utility script for quickly getting up and started with self-hosted applicaitons."
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
echo "This script assumes the following:"
|
echo "This script assumes the following:"
|
||||||
echo "- You have already signed in to the cloudflared CLI application;"
|
echo "- You have already signed in to the cloudflared CLI application;"
|
||||||
echo "- You own a domain through Cloudflare;"
|
echo "- You own a domain through Cloudflare;"
|
||||||
@@ -44,7 +40,6 @@ done
|
|||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
[ "${1:-}" = "--" ] && shift
|
[ "${1:-}" = "--" ] && shift
|
||||||
<<<<<<< HEAD
|
|
||||||
# TODO: Connect with cross-platform package manager from quaxlyqueen/scripts
|
# TODO: Connect with cross-platform package manager from quaxlyqueen/scripts
|
||||||
# TODO: Setup ollama (pull LLM best fitting hardware).
|
# TODO: Setup ollama (pull LLM best fitting hardware).
|
||||||
|
|
||||||
@@ -109,6 +104,7 @@ createTunnel() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
=======
|
=======
|
||||||
|
=======
|
||||||
# TODO: Install dependencies.
|
# TODO: Install dependencies.
|
||||||
# TODO: Add CLI option to enable cloudflared
|
# TODO: Add CLI option to enable cloudflared
|
||||||
|
|
||||||
@@ -168,5 +164,4 @@ cloudflared tunnel run $TUNNEL_NAME
|
|||||||
|
|
||||||
if [[ "$VERBOSE" -eq 1 ]]; then
|
if [[ "$VERBOSE" -eq 1 ]]; then
|
||||||
echo "Complete!"
|
echo "Complete!"
|
||||||
fi
|
fi
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
@@ -21,15 +21,12 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /security-layer
|
|||||||
# But we can document in the Dockerfile what ports
|
# But we can document in the Dockerfile what ports
|
||||||
# the application is going to listen on by default.
|
# the application is going to listen on by default.
|
||||||
# https://docs.docker.com/reference/dockerfile/#expose
|
# https://docs.docker.com/reference/dockerfile/#expose
|
||||||
<<<<<<< HEAD
|
|
||||||
# TODO: Need to dynamically expose ports based upon ~/.config/one-ai/test.json
|
# TODO: Need to dynamically expose ports based upon ~/.config/one-ai/test.json
|
||||||
EXPOSE 1111
|
EXPOSE 1111
|
||||||
EXPOSE 1112
|
EXPOSE 1112
|
||||||
EXPOSE 1113
|
EXPOSE 1113
|
||||||
EXPOSE 1114
|
EXPOSE 1114
|
||||||
=======
|
|
||||||
EXPOSE 8000
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
CMD ["/security-layer"]
|
CMD ["/security-layer"]
|
||||||
|
|||||||
@@ -5,10 +5,5 @@ sudo docker rm -f security-layer
|
|||||||
# Build the Docker image.
|
# Build the Docker image.
|
||||||
sudo docker build --tag security-layer:latest .
|
sudo docker build --tag security-layer:latest .
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# Create a Docker container from the image and connect host port 1111 to container port 1111, and 1114 to 1114.
|
# Create a Docker container from the image and connect host port 1111 to container port 1111, and 1114 to 1114.
|
||||||
sudo docker run --name security-layer -d -p 1111:1111 -p 1114:1114 security-layer:latest
|
sudo docker run --name security-layer -d -p 1111:1111 -p 1114:1114 security-layer:latest
|
||||||
=======
|
|
||||||
# Create a Docker container from the image and connect host port 8000 to container port 8000.
|
|
||||||
sudo docker run --name security-layer -d -p 8000:8000 security-layer:latest
|
|
||||||
>>>>>>> 8e9b82829bebbb9a096236b505c2e8a17b8a9403
|
|
||||||
Reference in New Issue
Block a user