Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into aziz/unjsonable
Browse files Browse the repository at this point in the history
  • Loading branch information
abyesilyurt committed Oct 11, 2024
2 parents 83c28bc + 6ea6d4f commit d1f5592
Show file tree
Hide file tree
Showing 24 changed files with 1,945 additions and 256 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include syftbox *.html *.js *.css *.zip
recursive-include syftbox *.html *.js *.css *.zip *.sh
recursive-include default_apps *.py *.sh *.html *.js *.css *.zip *.png *.txt *.csv
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@

# Quickstart User Installation

## install uv
## SyftBox 1 liner

curl -LsSf https://syftbox.openmined.org/install.sh | sh -s -- run

## Manual install

### install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

## create a virtualenv somewhere
### create a virtualenv somewhere

uv venv .venv

## Install Syftbox
### Install Syftbox

uv pip install -U syftbox

## run the client
### run the client

uv run syftbox client

Expand Down Expand Up @@ -66,13 +72,17 @@ uv run syftbox/client/client.py
### Run Client

```
syftbox client --config_path=./config.json --sync_folder=~/Desktop/SyftBox [email protected] --port=8082 --server=http://20.168.10.234:8080
syftbox client --config_path=./config.json --sync_folder=~/Desktop/SyftBox [email protected] --port=8082 --server=https://syftbox.openmined.org
```

### Staging Server

If you have issues or want to use a bleeding edge server try --server=https://syftboxstage.openmined.org

### Deploy

This builds the latest source to a wheel and deploys and restarts the server:
http://20.168.10.234:8080
https://syftbox.openmined.org

```
./scripts/deploy.sh
Expand Down
44 changes: 44 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,56 @@ run-client name port="auto" server="http://localhost:5001":

# ---------------------------------------------------------------------------------------------------------------------

[group('client')]
run-live-client server="https://syftbox.openmined.org/":
#!/bin/bash
set -eou pipefail

# Working directory for client is .clients/<email>
CONFIG_DIR=~/.syftbox
mkdir -p $CONFIG_DIR

echo -e "Config Dir : $CONFIG_DIR"

uv run syftbox/client/client.py --config_path=$CONFIG_DIR/client_config.json --server={{ server }}

# ---------------------------------------------------------------------------------------------------------------------

# Run a local syftbox app command
[group('app')]
run-app name command subcommand="":
#!/bin/bash
set -eou pipefail

# generate a local email from name, but if it looks like an email, then use it as is
EMAIL="{{ name }}@openmined.org"
if [[ "{{ name }}" == *@*.* ]]; then EMAIL="{{ name }}"; fi

# Working directory for client is .clients/<email>
CONFIG_DIR=.clients/$EMAIL/config
SYNC_DIR=.clients/$EMAIL/sync
mkdir -p $CONFIG_DIR $SYNC_DIR

echo -e "Config Dir : $CONFIG_DIR"

uv run syftbox/main.py app {{ command }} {{ subcommand }} --config_path=$CONFIG_DIR/config.json

# ---------------------------------------------------------------------------------------------------------------------

# Build syftbox wheel
[group('build')]
build:
rm -rf dist
uv build


# Build syftbox wheel
[group('install')]
install:
rm -rf dist
uv build
uv tool install $(ls /Users/madhavajay/dev/syft/dist/*.whl) --reinstall

# Bump version, commit and tag
[group('build')]
bump-version level="patch":
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies = [
"pydantic-settings>=2.5.2",
"pytest>=8.3.3",
"httpx>=0.27.2",
"pyyaml>=6.0.2",
"psutil>=6.0.0",
]

[project.optional-dependencies]
Expand All @@ -40,6 +42,7 @@ build-backend = "setuptools.build_meta"
# this will be completely ignored in the built wheel
dev-dependencies = [
"bump2version>=1.0.1",
"faker>=30.3.0",
"pre-commit>=4.0.1",
"pytest-cov>=5.0.0",
"pytest-xdist[psutil]>=3.6.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/live_andrew.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
uv run syftbox/client/client.py --config_path=./users/live_andrew.json --sync_folder=./users/live_andrew [email protected] --port=8082 --server=http://20.168.10.234:8080
uv run syftbox/client/client.py --config_path=./users/live_andrew.json --sync_folder=./users/live_andrew [email protected] --port=8082 --server=https://syftbox.openmined.org
2 changes: 1 addition & 1 deletion scripts/live_madhava.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
uv run syftbox/client/client.py --config_path=./users/live_madhava.json --sync_folder=./users/live_madhava [email protected] --port=8081 --server=http://20.168.10.234:8080
uv run syftbox/client/client.py --config_path=./users/live_madhava.json --sync_folder=./users/live_madhava [email protected] --port=8081 --server=https://syftbox.openmined.org
Empty file added syftbox/app/__init__.py
Empty file.
Loading

0 comments on commit d1f5592

Please sign in to comment.