MH0386 commited on
Commit
520dc1a
·
verified ·
1 Parent(s): a56ea50

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -19
Dockerfile CHANGED
@@ -1,24 +1,12 @@
1
- FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce AS builder
2
-
3
- COPY --from=ghcr.io/astral-sh/uv:latest@sha256:67b2bcccdc103d608727d1b577e58008ef810f751ed324715eb60b3f0c040d30 \
4
- /uv /uvx /usr/bin/
5
-
6
- # skipcq: DOK-DL3018
7
- RUN apk add --no-cache build-base git
8
-
9
- USER nonroot
10
-
11
- RUN --mount=type=cache,target=/root/.cache/uv \
12
- uv tool install chattr
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
  FASTEMBED_CACHE_PATH=/home/nonroot/fastembed \
19
- PATH=/home/nonroot/.local/bin:$PATH \
20
- PYTHONHOME=/home/nonroot/.local/share/uv/python/cpython-3.13.6-linux-x86_64-gnu \
21
- PYTHON_VERSION=3.13.6
 
22
 
23
  # skipcq: DOK-DL3018
24
  RUN apk add --no-cache curl libstdc++
@@ -27,8 +15,9 @@ USER nonroot
27
 
28
  WORKDIR /home/nonroot
29
 
30
- COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
 
31
 
32
  EXPOSE ${GRADIO_SERVER_PORT}
33
 
34
- CMD ["chattr"]
 
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=/home/nonroot/fastembed \
6
+ PATH=/home/nonroot/.local/bin:$PATH
7
+
8
+ COPY --from=ghcr.io/astral-sh/uv:latest@sha256:67b2bcccdc103d608727d1b577e58008ef810f751ed324715eb60b3f0c040d30 \
9
+ /uv /uvx /usr/bin/
10
 
11
  # skipcq: DOK-DL3018
12
  RUN apk add --no-cache curl libstdc++
 
15
 
16
  WORKDIR /home/nonroot
17
 
18
+ RUN --mount=type=cache,target=/root/.cache/uv \
19
+ uv tool install chattr
20
 
21
  EXPOSE ${GRADIO_SERVER_PORT}
22
 
23
+ CMD ["uvx", "chattr"]