Skip to content

Commit 1ff5f60

Browse files
authored
Upgrade python 3.11 libs (#13)
* Python 3.11 upgrade * Updates to protobuf, pyathena, pydgraph * Upgrade snowflake-connector-python
1 parent 3fc726b commit 1ff5f60

File tree

4 files changed

+291
-213
lines changed

4 files changed

+291
-213
lines changed

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ COPY --chown=redash scripts /frontend/scripts
1919
# Controls whether to instrument code for coverage information
2020
ARG code_coverage
2121
ENV BABEL_ENV=${code_coverage:+test}
22+
ENV GITHUB_PAT=${GITHUB_PAT}
2223

2324
# Avoid issues caused by lags in disk and network I/O speeds when working on top of QEMU emulation for multi-platform image building.
2425
RUN yarn config set network-timeout 300000
@@ -37,7 +38,7 @@ RUN <<EOF
3738
fi
3839
EOF
3940

40-
FROM python:3.10-slim-bookworm
41+
FROM python:3.11-slim-bookworm
4142

4243
EXPOSE 5000
4344

@@ -98,18 +99,18 @@ WORKDIR /app
9899
ENV POETRY_VERSION=1.8.3
99100
ENV POETRY_HOME=/etc/poetry
100101
ENV POETRY_VIRTUALENVS_CREATE=false
102+
ENV PIP_PREFER_BINARY=1
101103
RUN curl -sSL https://install.python-poetry.org | python3 -
102104

103-
# Avoid crashes, including corrupted cache artifacts, when building multi-platform images with GitHub Actions.
104-
RUN /etc/poetry/bin/poetry cache clear pypi --all
105-
105+
# Use BuildKit cache mount for Poetry cache to speed up builds
106106
COPY pyproject.toml poetry.lock ./
107107

108-
ARG POETRY_OPTIONS="--no-root --no-interaction --no-ansi"
108+
ARG POETRY_OPTIONS="--no-root --no-ansi --no-interaction"
109109
# for LDAP authentication, install with `ldap3` group
110110
# disabled by default due to GPL license conflict
111111
ARG install_groups="main,all_ds,dev"
112-
RUN /etc/poetry/bin/poetry install --only $install_groups $POETRY_OPTIONS
112+
RUN --mount=type=cache,target=/root/.cache/pypoetry \
113+
/etc/poetry/bin/poetry install --only $install_groups $POETRY_OPTIONS
113114

114115
COPY --chown=redash . /app
115116
COPY --from=frontend-builder --chown=redash /frontend/client/dist /app/client/dist

compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ x-redash-service: &redash-service
55
context: .
66
args:
77
skip_frontend_build: "true" # set to empty string to build
8+
# Enable BuildKit for faster builds with cache mounts
9+
dockerfile: Dockerfile
810
volumes:
911
- .:/app
1012
env_file:

0 commit comments

Comments
 (0)