Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test python 3.12 #254

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fi

if [[ ${{ inputs.eventname }} == 'pull_request' ]]; then
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
echo "PLATFORMS=linux/arm/v6" >> $GITHUB_ENV
else
echo "PLATFORMS=${{ inputs.platforms }}" >> $GITHUB_ENV
fi
Expand Down
29 changes: 25 additions & 4 deletions Docker/PlexAniSync/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
FROM python:3.11 AS builder
ARG python_version=3.12

FROM ubuntu AS base
ARG python_version

RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python-${python_version} python3-pip && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
python3 -m pip install pip && \
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1

FROM base AS builder

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

RUN apt-get update && \
apt-get install -y \
build-essential \
rustc \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip
COPY Docker/PlexAniSync/pip.conf /etc/pip.conf
COPY requirements.txt .
# install dependencies to the local user directory (eg. /root/.local)
RUN pip install --user --no-warn-script-location -r requirements.txt
RUN --mount=type=tmpfs,target=/root/.cargo \
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \
CARGO_HOME=/root/.cargo \
pip install --user --no-warn-script-location -r requirements.txt

FROM python:3.11-slim
FROM base
ARG python_version

WORKDIR /plexanisync

Expand All @@ -20,7 +41,7 @@ COPY --from=builder /root/.local /root/.local
RUN chmod -R a+rX /root
# update PATH environment variable
ENV PATH=/root/.local:$PATH
ENV PYTHONPATH=/root/.local/lib/python3.11/site-packages
ENV PYTHONPATH=/root/.local/lib/python${python_version}/site-packages

ENV PLEX_SECTION=Anime \
PLEX_URL=http://127.0.0.1:32400 \
Expand Down
Loading