MH0386 commited on
Commit
5765aab
·
verified ·
1 Parent(s): d549749

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .gitignore +4 -17
  2. Dockerfile +17 -32
.gitignore CHANGED
@@ -1,17 +1,4 @@
1
- **/__pycache__/
2
- **.dccache
3
- **.env
4
- .mypy_cache/
5
- .ruff_cache/
6
- .venv/
7
- logs/
8
- results/
9
- ckpts/
10
- Anitalker/
11
- outputs/
12
-
13
- .github/
14
- .trunk/
15
- .idea/
16
- renovate.json
17
- .deepsource.toml
 
1
+ *
2
+ !.gitignore
3
+ !README.md
4
+ !Dockerfile
 
 
 
 
 
 
 
 
 
 
 
 
 
Dockerfile CHANGED
@@ -1,46 +1,31 @@
1
- FROM python:3.10 AS builder
2
 
3
- SHELL ["/bin/bash", "-c"]
 
4
 
5
- ENV UV_LINK_MODE=copy \
6
- UV_COMPILE_BYTECODE=1 \
7
- UV_PYTHON_DOWNLOADS=0
8
 
9
- COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
10
-
11
- WORKDIR /app
12
-
13
- RUN --mount=type=cache,target=/root/.cache/uv \
14
- --mount=type=bind,source=uv.lock,target=uv.lock \
15
- --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
16
- --mount=type=bind,source=README.md,target=README.md \
17
- uv sync --no-install-project --no-dev --locked --no-editable
18
-
19
- COPY . /app
20
 
21
  RUN --mount=type=cache,target=/root/.cache/uv \
22
- uv sync --no-dev --locked --no-editable
23
-
24
- FROM python:3.10-slim AS production
25
 
26
- SHELL ["/bin/bash", "-c"]
27
 
28
  ENV GRADIO_SERVER_PORT=7860 \
29
- GRADIO_SERVER_NAME=0.0.0.0
30
- # skipcq: DOK-DL3008
31
- RUN groupadd app && \
32
- useradd -m -g app -s /bin/bash app && \
33
- apt-get update -qq && \
34
- apt-get install -qq -y --no-install-recommends espeak-ng ffmpeg && \
35
- apt-get clean -qq && \
36
- rm -rf /var/lib/apt/lists/*
37
 
38
- WORKDIR /home/app
39
 
40
- COPY --from=builder --chown=app:app /app/.venv /app/.venv
41
 
42
- USER app
43
 
44
  EXPOSE ${GRADIO_SERVER_PORT}
45
 
46
- CMD ["/app/.venv/bin/vocalizr"]
 
1
+ FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce AS builder
2
 
3
+ COPY --from=ghcr.io/astral-sh/uv:latest@sha256:b05b3d61eb2b264ed785265b71155738a0d3d382ea0699e048d4b36f90b88788 \
4
+ /uv /uvx /usr/bin/
5
 
6
+ # skipcq: DOK-DL3018
7
+ RUN apk add --no-cache git build-base
 
8
 
9
+ USER nonroot
 
 
 
 
 
 
 
 
 
 
10
 
11
  RUN --mount=type=cache,target=/root/.cache/uv \
12
+ uv tool install git+https://github.com/AlphaSphereDotAI/visualizr
 
 
13
 
14
+ FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce AS production
15
 
16
  ENV GRADIO_SERVER_PORT=7860 \
17
+ GRADIO_SERVER_NAME=0.0.0.0 \
18
+ PATH=/home/nonroot/.local/bin:$PATH
19
+
20
+ # skipcq: DOK-DL3018
21
+ RUN apk add --no-cache curl #libstdc++
 
 
 
22
 
23
+ USER nonroot
24
 
25
+ WORKDIR /home/nonroot
26
 
27
+ COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
28
 
29
  EXPOSE ${GRADIO_SERVER_PORT}
30
 
31
+ CMD ["visualizr"]