mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 08:26:32 +00:00
d244799f02
Made-with: Cursor
22 lines
1.4 KiB
Docker
22 lines
1.4 KiB
Docker
FROM python:3.11-slim
|
|
RUN apt-get update && apt-get install -y python3-dev gcc pciutils curl gnupg pkg-config \
|
|
uuid-dev libtss2-dev libtss2-fapi1 libtss2-tcti-device0 libtss2-tcti-mssim0 && \
|
|
install -m 0755 -d /etc/apt/keyrings && \
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
|
|
chmod a+r /etc/apt/keyrings/docker.asc && \
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list && \
|
|
apt-get update && apt-get install -y docker-ce-cli && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt && \
|
|
TSSPC="$(find /usr/lib -path '*/pkgconfig/tss2-fapi.pc' -print -quit)" && \
|
|
export PKG_CONFIG_PATH="$(dirname "$TSSPC"):/usr/share/pkgconfig:/usr/lib/pkgconfig" && \
|
|
pkg-config --exists tss2-fapi && \
|
|
pip install --no-cache-dir setuptools wheel pkgconfig pycparser cffi packaging && \
|
|
PIP_NO_BUILD_ISOLATION=1 pip install --no-cache-dir --force-reinstall --no-binary tpm2-pytss --no-deps tpm2-pytss==2.3.0
|
|
COPY . .
|
|
RUN python setup.py build_ext --inplace
|
|
EXPOSE 8080
|
|
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--app-dir", "src"]
|