-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15aab28
commit 253ea5d
Showing
8 changed files
with
164 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -422,7 +422,7 @@ DEPENDENCIES | |
tzinfo-data | ||
|
||
RUBY VERSION | ||
ruby 3.3.1p55 | ||
ruby 3.3.5p100 | ||
|
||
BUNDLED WITH | ||
2.5.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.9.16 | ||
3.12.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
FROM python:3.9-slim-buster | ||
FROM python:slim | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ffmpeg curl | ||
|
||
RUN pip install uv | ||
|
||
COPY sub-audio/pyproject.toml sub-audio/poetry.lock ./ | ||
|
||
RUN pip install poetry && poetry config virtualenvs.create false && poetry install --only main --no-root | ||
RUN uv pip install --no-cache --system -r requirements.lock | ||
|
||
COPY sub-audio/* . | ||
|
||
EXPOSE 3203 | ||
|
||
CMD [ "poetry", "run", "poe", "start" ] | ||
CMD python main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,37 @@ | ||
[tool.poetry] | ||
name = "sub-image" | ||
[project] | ||
name = "sub-audio" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["sevenc-nanashi <sevenc7c@sevenc7c.com>"] | ||
package-mode = false | ||
authors = [{ name = "sevenc-nanashi", email = "sevenc7c@sevenc7c.com" }] | ||
dependencies = [ | ||
"fastapi>=0.114.1", | ||
"uvicorn>=0.30.6", | ||
"gunicorn>=23.0.0", | ||
"python-dotenv>=1.0.1", | ||
"redis>=5.0.8", | ||
"sentry-sdk>=2.14.0", | ||
] | ||
requires-python = ">= 3.12" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
fastapi = "^0.88.0" | ||
uvicorn = "^0.20.0" | ||
gunicorn = "^20.1.0" | ||
python-dotenv = "^0.21.0" | ||
poethepoet = "^0.17.1" | ||
redis = "^4.4.2" | ||
sentry-sdk = "^1.29.2" | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = "^22.12.0" | ||
isort = "^5.12.0" | ||
[tool.rye] | ||
managed = true | ||
dev-dependencies = [ | ||
"pytest>=8.3.3", | ||
"httpx>=0.27.2", | ||
"ruff>=0.6.4", | ||
] | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = "^7.2.1" | ||
httpx = "^0.23.3" | ||
[tool.rye.scripts] | ||
test = "pytest" | ||
lint = "ruff lint" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.black] | ||
target-version = ['py39'] | ||
line-length = 120 | ||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/sub_audio"] | ||
|
||
[tool.poe.tasks] | ||
start = "gunicorn -w 2 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:3202 main:app" | ||
dev = "uvicorn main:app --reload --port 3202" | ||
lint-black = "black . --check" | ||
lint-isort = "isort . --check-only" | ||
lint = ["lint-black", "lint-isort"] | ||
format-black = "black ." | ||
format-isort = "isort ." | ||
format = ["format-black", "format-isort"] | ||
test = "pytest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
annotated-types==0.7.0 | ||
# via pydantic | ||
anyio==4.4.0 | ||
# via httpx | ||
# via starlette | ||
certifi==2024.8.30 | ||
# via httpcore | ||
# via httpx | ||
# via sentry-sdk | ||
click==8.1.7 | ||
# via uvicorn | ||
fastapi==0.114.1 | ||
# via sub-audio | ||
gunicorn==23.0.0 | ||
# via sub-audio | ||
h11==0.14.0 | ||
# via httpcore | ||
# via uvicorn | ||
httpcore==1.0.5 | ||
# via httpx | ||
httpx==0.27.2 | ||
idna==3.8 | ||
# via anyio | ||
# via httpx | ||
iniconfig==2.0.0 | ||
# via pytest | ||
packaging==24.1 | ||
# via gunicorn | ||
# via pytest | ||
pluggy==1.5.0 | ||
# via pytest | ||
pydantic==2.9.1 | ||
# via fastapi | ||
pydantic-core==2.23.3 | ||
# via pydantic | ||
pytest==8.3.3 | ||
python-dotenv==1.0.1 | ||
# via sub-audio | ||
redis==5.0.8 | ||
# via sub-audio | ||
ruff==0.6.4 | ||
sentry-sdk==2.14.0 | ||
# via sub-audio | ||
sniffio==1.3.1 | ||
# via anyio | ||
# via httpx | ||
starlette==0.38.5 | ||
# via fastapi | ||
typing-extensions==4.12.2 | ||
# via fastapi | ||
# via pydantic | ||
# via pydantic-core | ||
urllib3==2.2.3 | ||
# via sentry-sdk | ||
uvicorn==0.30.6 | ||
# via sub-audio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
annotated-types==0.7.0 | ||
# via pydantic | ||
anyio==4.4.0 | ||
# via starlette | ||
certifi==2024.8.30 | ||
# via sentry-sdk | ||
click==8.1.7 | ||
# via uvicorn | ||
fastapi==0.114.1 | ||
# via sub-audio | ||
gunicorn==23.0.0 | ||
# via sub-audio | ||
h11==0.14.0 | ||
# via uvicorn | ||
idna==3.8 | ||
# via anyio | ||
packaging==24.1 | ||
# via gunicorn | ||
pydantic==2.9.1 | ||
# via fastapi | ||
pydantic-core==2.23.3 | ||
# via pydantic | ||
python-dotenv==1.0.1 | ||
# via sub-audio | ||
redis==5.0.8 | ||
# via sub-audio | ||
sentry-sdk==2.14.0 | ||
# via sub-audio | ||
sniffio==1.3.1 | ||
# via anyio | ||
starlette==0.38.5 | ||
# via fastapi | ||
typing-extensions==4.12.2 | ||
# via fastapi | ||
# via pydantic | ||
# via pydantic-core | ||
urllib3==2.2.3 | ||
# via sentry-sdk | ||
uvicorn==0.30.6 | ||
# via sub-audio |