Skip to content

Instantly share code, notes, and snippets.

@nachocodexx
Last active May 8, 2025 05:10
Show Gist options
  • Save nachocodexx/f1c8b281ddb2f69377c925222a1acab5 to your computer and use it in GitHub Desktop.
Save nachocodexx/f1c8b281ddb2f69377c925222a1acab5 to your computer and use it in GitHub Desktop.
Dockerfile Pyfhel
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
# Step 1: Install prerequisites
RUN apt-get update && apt-get install -y \
software-properties-common \
lzip git make sudo curl build-essential libssl-dev libffi-dev \
zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev liblzma-dev \
gcc g++ cmake ninja-build \
&& sudo apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Step 2: Add deadsnakes PPA and install Python 3.10
RUN sudo add-apt-repository ppa:deadsnakes/ppa && \
sudo apt-get update && \
sudo apt-get install -y python3.10 python3.10-dev python3.10-distutils && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# Step 3: Create symlinks for python3 and pip3
RUN sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
sudo update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip3.10 1
RUN pip3 install toml numpy cython
RUN git clone --recursive https://github.com/ibarrond/Pyfhel
RUN cd Pyfhel && python3.10 setup.py install
CMD ["sleep", "infinity"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment