MH0386 commited on
Commit
dfd58b7
·
verified ·
1 Parent(s): c72fec1

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitignore +4 -0
  2. Dockerfile +21 -5
  3. README.md +7 -0
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ *
2
+ !.gitignore
3
+ !README.md
4
+ !Dockerfile
Dockerfile CHANGED
@@ -1,13 +1,29 @@
1
- FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce
 
 
 
 
 
 
 
 
 
 
2
 
3
  ENV GRADIO_SERVER_PORT=7860 \
4
  GRADIO_SERVER_NAME=0.0.0.0 \
5
- FASTEMBED_CACHE_PATH=/fastembed
 
6
 
7
  # skipcq: DOK-DL3018
8
- RUN apk add --no-cache curl libstdc++ uv python3 && \
9
- uv tool install chattr
 
 
 
 
 
10
 
11
  EXPOSE ${GRADIO_SERVER_PORT}
12
 
13
- CMD ["uvx", "--no-cache", "chattr"]
 
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
+ USER nonroot
7
+
8
+ RUN --mount=type=cache,target=/root/.cache/uv \
9
+ uv tool install chattr
10
+
11
+ FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce AS production
12
 
13
  ENV GRADIO_SERVER_PORT=7860 \
14
  GRADIO_SERVER_NAME=0.0.0.0 \
15
+ FASTEMBED_CACHE_PATH=/home/nonroot/fastembed \
16
+ PATH=/home/nonroot/.local/bin:$PATH
17
 
18
  # skipcq: DOK-DL3018
19
+ RUN apk add --no-cache curl libstdc++
20
+
21
+ USER nonroot
22
+
23
+ WORKDIR /home/nonroot
24
+
25
+ COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
26
 
27
  EXPOSE ${GRADIO_SERVER_PORT}
28
 
29
+ CMD ["chattr"]
README.md CHANGED
@@ -10,6 +10,13 @@ short_description: Chat with Characters
10
 
11
  ## **Chattr**: App part of the Chatacter Backend
12
 
 
 
 
 
 
 
 
13
  ### Environment Variables
14
 
15
  The configuration of the server is done using environment variables:
 
10
 
11
  ## **Chattr**: App part of the Chatacter Backend
12
 
13
+ [![Build](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/build.yaml/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/build.yaml)
14
+ [![CI Tools](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/ci_tools.yaml/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/ci_tools.yaml)
15
+ [![CodeQL](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/github-code-scanning/codeql)
16
+ [![Dependabot Updates](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/dependabot/dependabot-updates)
17
+ [![Release](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/release.yaml/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/release.yaml)
18
+ [![Test](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/test.yaml/badge.svg)](https://github.com/AlphaSphereDotAI/chattr/actions/workflows/test.yaml)
19
+
20
  ### Environment Variables
21
 
22
  The configuration of the server is done using environment variables: