Skip to content

Commit e1806ba

Browse files
committed
initial public release commit
1 parent 1acf95f commit e1806ba

86 files changed

Lines changed: 11161 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
share/python-wheels/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
MANIFEST
25+
26+
27+
.pdm.toml
28+
.pdm-python
29+
.pdm-build/
30+
31+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
32+
__pypackages__/
33+
34+
# Environments
35+
.env
36+
.venv
37+
env/
38+
venv/
39+
ENV/
40+
env.bak/
41+
venv.bak/
42+
43+
# mypy
44+
.mypy_cache/
45+
.dmypy.json
46+
dmypy.json
47+
48+
artifacts/*
49+
.vscode/*

.pre-commit-config.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
fail_fast: True
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: fix-encoding-pragma
8+
exclude: 'docs/.*'
9+
- id: check-yaml
10+
exclude: 'docs/.*'
11+
- id: trailing-whitespace
12+
exclude: 'docs/.*'
13+
- id: name-tests-test
14+
args: ["--pytest-test-first"]
15+
exclude: 'docs/.*'
16+
- id: check-added-large-files
17+
args: ["--maxkb=10"]
18+
- id: check-docstring-first
19+
exclude: 'docs/.*'
20+
- id: check-case-conflict
21+
exclude: 'docs/.*'
22+
- id: check-shebang-scripts-are-executable
23+
exclude: 'docs/.*'
24+
25+
- repo: https://github.com/gitleaks/gitleaks
26+
rev: v8.16.1
27+
hooks:
28+
- id: gitleaks
29+
exclude: '.*/tests/.*'
30+
31+
- repo: https://github.com/astral-sh/ruff-pre-commit
32+
rev: v0.9.3
33+
hooks:
34+
- id: ruff
35+
- id: ruff-format
36+
37+
- repo: https://github.com/pre-commit/mirrors-mypy
38+
rev: v1.14.1
39+
hooks:
40+
- id: mypy
41+
name: mypy
42+
entry: mypy
43+
language: python
44+
types: [python]
45+
additional_dependencies:
46+
- "pydantic>=2.8.2"

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.12

docker/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM sinapsis-nvidia:base
2+
RUN apt-get update && apt-get install -y ffmpeg python3.10-dev
3+
4+
RUN uv pip install sinapsis-data-tools[all] --extra-index-url https://pypi.sinapsis.tech
5+
WORKDIR /app/.venv

docker/Dockerfile-dev

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM sinapsis-nvidia:base
2+
# install essential packages
3+
RUN apt-get update && apt-get install -y ffmpeg python3.10-dev
4+
5+
COPY . /app/
6+
WORKDIR /app
7+
8+
RUN uv sync --frozen --all-extras --all-packages
9+
RUN uv build --all-packages
10+
11+
# install the generated wheels for this app
12+
RUN uv pip install /app/dist/sinapsis_*none-any.whl

docker/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> [!IMPORTANT]
2+
> To build the sinapsis-data-tools image you need
3+
the sinapsis-nvidia:base image. To build it, please follow the instructions in
4+
the [sinapsis repo](https://github.com/Sinapsis-ai/sinapsis?tab=readme-ov-file#docker)

docker/compose.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
sinapsis-data-tools: &default
3+
image: sinapsis-data-tools:base
4+
build:
5+
context: ../
6+
dockerfile: docker/Dockerfile
7+
ssh:
8+
- default
9+
environment:
10+
PYTHONPATH: /lib/python3.10/:/app/.venv/lib/python3.10/site-packages
11+
LD_LIBRARY_PATH: /app/.venv/lib/python3.10/site-packages/nvidia/cublas/lib
12+
deploy:
13+
resources:
14+
reservations:
15+
devices:
16+
- driver: nvidia
17+
count: 1
18+
capabilities: [ gpu ]
19+
volumes:
20+
- "~/.cache/sinapsis/:/root/.cache/sinapsis"

0 commit comments

Comments
 (0)