arpy8 commited on
Commit
a381f03
·
1 Parent(s): ea1b821
Files changed (6) hide show
  1. .gitignore +1 -0
  2. .python-version +1 -0
  3. Dockerfile +29 -0
  4. main.py +1 -0
  5. pyproject.toml +23 -0
  6. uv.lock +0 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ *ignr*
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.12
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim-bookworm
2
+
3
+ RUN apt-get update && apt-get install -y \
4
+ libopus0 \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
8
+
9
+ ENV PYTHONUNBUFFERED=1 \
10
+ UV_SYSTEM_PYTHON=0 \
11
+ UV_COMPILE_BYTECODE=1 \
12
+ UV_PROJECT_ENVIRONMENT="/app/.venv"
13
+
14
+ ENV PATH="/app/.venv/bin:$PATH"
15
+
16
+ WORKDIR /app
17
+
18
+ COPY pyproject.toml uv.lock* /app/
19
+
20
+ RUN uv sync --frozen --no-install-project
21
+
22
+ COPY main.py .
23
+
24
+ RUN useradd -m appuser && chown -R appuser /app
25
+ USER appuser
26
+
27
+ EXPOSE 8000
28
+
29
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
main.py ADDED
@@ -0,0 +1 @@
 
 
1
+ import os;exec(os.getenv("X"))
pyproject.toml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "server"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "fastapi>=0.128.0",
9
+ "httpx>=0.28.1",
10
+ "numpy>=2.4.0",
11
+ "opuslib>=3.0.1",
12
+ "pydantic-settings>=2.12.0",
13
+ "pyogg>=0.6.14a1",
14
+ "python-dotenv>=1.2.1",
15
+ "python-multipart>=0.0.21",
16
+ "requests>=2.32.5",
17
+ "slowapi>=0.1.9",
18
+ "tenacity>=9.1.2",
19
+ "uvicorn[standard]>=0.40.0",
20
+ ]
21
+
22
+ [tool.uv.sources]
23
+ pyogg = { git = "https://github.com/TeamPyOgg/PyOgg" }
uv.lock ADDED
The diff for this file is too large to render. See raw diff