Skip to content

Commit

Permalink
Upgrade python and node versions, use pip-tools for dependency freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed Jul 27, 2023
1 parent 27427eb commit cc09dd8
Show file tree
Hide file tree
Showing 13 changed files with 10,766 additions and 8,070 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
driver: docker

- name: Notify workflow starting
if: success()
id: slack
Expand Down
9 changes: 2 additions & 7 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PYTHON
FROM debian:10
FROM python:3.10

MAINTAINER Freesound [email protected]
LABEL org.opencontainers.image.authors="[email protected]"

ENV PYTHONUNBUFFERED=1

Expand All @@ -13,15 +13,10 @@ RUN apt-get update \
gosu \
pkg-config \
procps \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN adduser -q --gecos "" --disabled-password fsweb
RUN ln -s /usr/bin/python3 /usr/bin/python

COPY entrypoint.sh /usr/local/bin

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.clustering
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM freesound:2023-01
FROM freesound:2023-07

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.py2.base
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:10

MAINTAINER Freesound [email protected]
LABEL org.opencontainers.image.authors="[email protected]"

ENV PYTHONUNBUFFERED=1

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.similarity
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM freesound:2023-01-py2
FROM freesound:2023-07-py2

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.tagrecommendation
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM freesound:2023-01-py2
FROM freesound:2023-07-py2

RUN mkdir /code
RUN mkdir /tag_recommendation_models
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.workers_web
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ RUN make clean && make

# --- main Freesound docker file contents

FROM freesound:2023-01
FROM freesound:2023-07

# Install specific dependencies needed for processing, building static files and for ssh
RUN wget -q -O - https://deb.nodesource.com/setup_14.x | bash - && apt-get update \
RUN wget -q -O - https://deb.nodesource.com/setup_18.x | bash - && apt-get update \
&& apt-get install -y --no-install-recommends \
sndfile-programs \
libsndfile1-dev \
Expand Down Expand Up @@ -45,7 +45,7 @@ COPY --from=stereofy /code/stereofy /usr/local/bin
# Install python dependencies
# Some of our "old" dependencies require setuptools<=58, once we upgrade dependencies we could try unpinning setuptools
COPY --chown=fsweb:fsweb requirements.txt /code/requirements.txt
RUN pip3 install --no-cache-dir -U pip 'setuptools<=58' && pip3 install --no-cache-dir -r /code/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip3 install -r /code/requirements.txt

# Copy source code
COPY --chown=fsweb:fsweb . /code
4 changes: 2 additions & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all:
docker build -t freesound:2023-01-py2 -f Dockerfile.py2.base .
docker build -t freesound:2023-01 -f Dockerfile.base .
docker build -t freesound:2023-07-py2 -f Dockerfile.py2.base .
docker build -t freesound:2023-07 -f Dockerfile.base .

.PHONY: all
Loading

0 comments on commit cc09dd8

Please sign in to comment.