File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ # from https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
2
+
3
+ # Install uv
4
+ FROM python:3.12-slim
5
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
6
+
7
+ # Change the working directory to the `app` directory
8
+ WORKDIR /app
9
+
10
+ # Install dependencies
11
+ RUN --mount=type=cache,target=/root/.cache/uv \
12
+ --mount=type=bind,source=uv.lock,target=uv.lock \
13
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
14
+ uv sync --frozen --no-install-project
15
+
16
+ # Copy the project into the image
17
+ ADD . /app
18
+
19
+ # Sync the project
20
+ RUN --mount=type=cache,target=/root/.cache/uv \
21
+ uv sync --frozen
22
+
23
+ ENTRYPOINT [ "uv" , "run" , "inferadmin" ]
Original file line number Diff line number Diff line change
1
+ services :
2
+ inferadmin :
3
+ build : .
4
+ ports :
5
+ - " 8000:8000"
6
+ volumes :
7
+ - /var/run/docker.sock:/var/run/docker.sock
8
+ env_file :
9
+ - .env
10
+ deploy :
11
+ resources :
12
+ reservations :
13
+ devices :
14
+ - capabilities : [gpu]
You can’t perform that action at this time.
0 commit comments