Skip to content

Commit

Permalink
chore(python): bump version to 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed May 3, 2023
1 parent e0253bf commit 5cc5d3a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ecr-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
28 changes: 16 additions & 12 deletions docker/onadata-uwsgi/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9 as intermediate
FROM python:3.10 as intermediate

ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
Expand All @@ -14,7 +14,6 @@ RUN mkdir -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh if [ -n "$optional_packages" ]; then pip install ${optional_packages} ; fi

FROM ubuntu:focal-20230412
COPY --from=intermediate /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/dist-packages/

ARG release_version=v3.7.1

Expand All @@ -27,6 +26,8 @@ ENV DJANGO_SETTINGS_MODULE onadata.settings.docker

# Install service dependencies
RUN apt-get update -q &&\
# Add deadsnakes repository for python packages
add-apt-repository ppa:deadsnakes/ppa -y &&\
apt-get install -y --no-install-recommends software-properties-common \
binutils \
libproj-dev \
Expand All @@ -35,8 +36,8 @@ RUN apt-get update -q &&\
libmemcached-dev \
build-essential \
supervisor \
python3.9 \
python3-dev \
python3.10 \
python3.10-dev \
python3-pip \
python3-setuptools \
git \
Expand All @@ -47,7 +48,7 @@ RUN apt-get update -q &&\
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
libpython3.9-dev \
libpython3.10-dev \
zlib1g-dev \
ghostscript \
python3-celery \
Expand Down Expand Up @@ -81,14 +82,17 @@ RUN chown -R onadata:onadata /srv/onadata

# Install service requirements
WORKDIR /srv/onadata

COPY --from=intermediate /usr/local/lib/python3.10/site-packages/ /usr/local/lib/python3.10/dist-packages/
# hadolint ignore=DL3013
RUN python3.9 -m pip install --no-cache-dir -U pip && \
python3.9 -m pip install --no-cache-dir -r requirements/base.pip && \
python3.9 -m pip install --no-cache-dir -r requirements/s3.pip && \
python3.9 -m pip install --no-cache-dir -r requirements/ses.pip && \
python3.9 -m pip install --no-cache-dir -r requirements/azure.pip && \
python3.9 -m pip install setuptools==65.5.1 && \
python3.9 -m pip install --no-cache-dir pyyaml uwsgitop
RUN python3.10 -m pip install --no-cache-dir -U pip && \
python3.10 -m pip install --no-cache-dir -r requirements/base.pip && \
python3.10 -m pip install --no-cache-dir -r requirements/s3.pip && \
python3.10 -m pip install --no-cache-dir -r requirements/ses.pip && \
python3.10 -m pip install --no-cache-dir -r requirements/azure.pip && \
python3.10 -m pip install setuptools==65.5.1 && \
python3.10 -m pip install --no-cache-dir pyyaml uwsgitop


# Compile API Docs
RUN make -C docs html
Expand Down

0 comments on commit 5cc5d3a

Please sign in to comment.