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

Fix docker armv7 cryptography module build #2436

Merged
merged 3 commits into from
Nov 27, 2024
Merged
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
10 changes: 7 additions & 3 deletions docker/Dockerfile-armv7
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ ENV G4F_USER_ID $G4F_USER_ID
ENV G4F_DIR /app

RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y git \
&& apt-get install -y git curl \
&& apt-get install --quiet --yes --no-install-recommends \
build-essential libffi-dev zlib1g-dev libjpeg-dev \
build-essential libffi-dev zlib1g-dev libjpeg-dev libssl-dev pkg-config \
# Add user and user group
&& groupadd -g $G4F_USER_ID $G4F_USER \
&& useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER \
Expand All @@ -26,7 +26,10 @@ USER $G4F_USER_ID
WORKDIR $G4F_DIR

ENV HOME /home/$G4F_USER
ENV PATH "${HOME}/.local/bin:${PATH}"
ENV PATH "${HOME}/.local/bin:${HOME}/.cargo/bin:${PATH}"

# Install rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Create app dir and copy the project's requirements file into it
RUN mkdir -p $G4F_DIR
Expand Down Expand Up @@ -56,6 +59,7 @@ RUN pip uninstall --yes \
USER root

# Clean up build deps
RUN rm --recursive --force "${HOME}/.rustup"
RUN apt-get purge --auto-remove --yes \
build-essential \
&& apt-get clean \
Expand Down