-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (60 loc) 路 1.93 KB
/
Copy pathMakefile
File metadata and controls
79 lines (60 loc) 路 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright (c) 2025-2026 Datalayer, Inc.
#
# BSD 3-Clause License
SHELL=/bin/bash
.DEFAULT_GOAL := default
.PHONY: clean build test
VERSION = "0.0.3"
PLATFORM ?= linux/amd64
LOAD ?= --load
default: all ## Default target is all.
help: ## display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
all: clean dev ## Clean Install and Build
install:
pip install .
dev:
pip install ".[test,lint,typing]"
build:
pip install build
python -m build .
test:
pytest -q
clean: ## clean
git clean -fdx
build-docker:
docker buildx build --platform $(PLATFORM) $(LOAD) -t datalayer/code-sandboxes:${VERSION} -f docker/Dockerfile .
docker image tag datalayer/code-sandboxes:${VERSION} datalayer/code-sandboxes:latest
docker image tag datalayer/code-sandboxes:${VERSION} datalayer/code-sandboxes:latest
start-docker:
docker run -i --rm \
-e SERVER_URL=http://localhost:8888 \
-e TOKEN=MY_TOKEN \
-e NOTEBOOK_PATH=notebook.ipynb \
--network=host \
datalayer/code-sandboxes:latest
pull-docker:
docker image pull datalayer/code-sandboxes:latest
push-docker:
docker push datalayer/code-sandboxes:${VERSION}
docker push datalayer/code-sandboxes:latest
claude-linux:
NIXPKGS_ALLOW_UNFREE=1 nix run github:k3d3/claude-desktop-linux-flake \
--impure \
--extra-experimental-features flakes \
--extra-experimental-features nix-command
jupyterlab:
pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt
jupyter lab \
--port 8888 \
--ip 0.0.0.0 \
--ServerApp.root_dir ./dev/content \
--IdentityProvider.token MY_TOKEN
publish-pypi: # publish the pypi package
git clean -fdx && \
python -m build
@exec echo
@exec echo twine upload ./dist/*-py3-none-any.whl
@exec echo
@exec echo https://pypi.org/project/code-sandboxes/#history