Skip to content

Commit 0144e86

Browse files
committed
Improve caching of deps
1 parent 661326f commit 0144e86

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
FROM --platform=linux/amd64 python:3.11@sha256:5062f6c22a2c3b8b3717c642af3852310d9a81c3c2c0fc72449a9a79ef09ae63
22

3+
# Install uv
4+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
5+
36
###################
47
## Parsons setup ##
58
###################
69

7-
RUN mkdir /src
8-
COPY . /src/
910
WORKDIR /src
11+
COPY pyproject.toml setup.py ./
12+
RUN uv sync --no-editable --all-extras --no-dev --python python3.11
1013

11-
# Install uv
12-
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
14+
COPY . /src/
1315

14-
# Install parsons
15-
RUN uv sync --upgrade --all-extras --python python3.11
1616
ENV PATH="/src/.venv/bin:$PATH"
17+
ENV PYTHONPATH=.:/app
1718

1819
# The /app directory can house the scripts that will actually execute on this Docker image.
19-
# Eg. If using this image in a Civis container script, Civis will install your script repo
20-
# (from Github) to /app.
20+
# Eg. If using this image in a Civis container script,
21+
# Civis will install your script repo (from Github) to /app.
2122
RUN mkdir /app
2223
WORKDIR /app
2324

24-
# Useful for importing modules that are associated with your python scripts:
25-
ENV PYTHONPATH=.:/app
25+
CMD ["python3"]

0 commit comments

Comments
 (0)