mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
dockerfile
This commit is contained in:
@@ -1,9 +1,14 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
|
||||||
RUN apt-get update &&\
|
RUN apt-get update && apt-get install -y locales \
|
||||||
apt-get install -y --no-install-recommends \
|
&& sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen \
|
||||||
wget ca-certificates \
|
&& locale-gen \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt install -y tzdata \
|
||||||
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
|
&& dpkg-reconfigure --frontend noninteractive tzdata \
|
||||||
|
&& apt-get install -y \
|
||||||
|
git wget ca-certificates \
|
||||||
clang-format-14 clang-14 clang-tidy-14 lld-14 \
|
clang-format-14 clang-14 clang-tidy-14 lld-14 \
|
||||||
build-essential meson gcc-12 g++-12 cmake rustc cargo \
|
build-essential meson gcc-12 g++-12 cmake rustc cargo \
|
||||||
google-perftools \
|
google-perftools \
|
||||||
@@ -23,16 +28,39 @@ RUN apt-get update &&\
|
|||||||
libuv1-dev &&\
|
libuv1-dev &&\
|
||||||
apt-get clean &&\
|
apt-get clean &&\
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
ARG FDB_VERSION=7.1.61
|
|
||||||
ARG FDB_DOWNLOAD_URL=https://github.com/apple/foundationdb/releases/download/7.1.61/foundationdb-clients_${FDB_VERSION}-1_amd64.deb
|
ARG TARGETARCH
|
||||||
RUN wget ${FDB_DOWNLOAD_URL} -O /tmp/foundationdb-clients.deb &&\
|
ARG FDB_VERSION=7.3.63
|
||||||
dpkg -i /tmp/foundationdb-clients.deb &&\
|
RUN echo "当前的架构是 ${TARGETARCH}" &&\
|
||||||
rm /tmp/foundationdb-clients.deb
|
if [ "${TARGETARCH}" = "amd64" ]; then\
|
||||||
|
echo "当前的架构是 amd64";\
|
||||||
|
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-clients_${FDB_VERSION}-1_amd64.deb &&\
|
||||||
|
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-server_${FDB_VERSION}-1_amd64.deb &&\
|
||||||
|
dpkg -i foundationdb-clients_${FDB_VERSION}-1_amd64.deb &&\
|
||||||
|
dpkg -i foundationdb-server_${FDB_VERSION}-1_amd64.deb &&\
|
||||||
|
rm foundationdb-clients_${FDB_VERSION}-1_amd64.deb &&\
|
||||||
|
rm foundationdb-server_${FDB_VERSION}-1_amd64.deb;\
|
||||||
|
elif [ "${TARGETARCH}" = "arm64" ]; then\
|
||||||
|
echo "当前的架构是 arm64";\
|
||||||
|
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-clients_${FDB_VERSION}-1_aarch64.deb &&\
|
||||||
|
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-server_${FDB_VERSION}-1_aarch64.deb &&\
|
||||||
|
dpkg -i foundationdb-clients_${FDB_VERSION}-1_aarch64.deb &&\
|
||||||
|
dpkg -i foundationdb-server_${FDB_VERSION}-1_aarch64.deb &&\
|
||||||
|
rm foundationdb-clients_${FDB_VERSION}-1_aarch64.deb &&\
|
||||||
|
rm foundationdb-server_${FDB_VERSION}-1_aarch64.deb;\
|
||||||
|
else\
|
||||||
|
echo "未知的架构" && exit 1;\
|
||||||
|
fi
|
||||||
ARG LIBFUSE_VERSION=3.16.2
|
ARG LIBFUSE_VERSION=3.16.2
|
||||||
ARG LIBFUSE_DOWNLOAD_URL=https://github.com/libfuse/libfuse/releases/download/fuse-${LIBFUSE_VERSION}/fuse-${LIBFUSE_VERSION}.tar.gz
|
ARG LIBFUSE_DOWNLOAD_URL=https://github.com/libfuse/libfuse/releases/download/fuse-${LIBFUSE_VERSION}/fuse-${LIBFUSE_VERSION}.tar.gz
|
||||||
RUN wget -O- ${LIBFUSE_DOWNLOAD_URL} |\
|
RUN wget -O- ${LIBFUSE_DOWNLOAD_URL} |\
|
||||||
tar -xzvf - -C /tmp &&\
|
tar -xzvf - -C /tmp &&\
|
||||||
cd /tmp/fuse-${LIBFUSE_VERSION} &&\
|
cd /tmp/fuse-${LIBFUSE_VERSION} &&\
|
||||||
mkdir build && cd build &&\
|
mkdir build && cd build &&\
|
||||||
meson setup .. && ninja && ninja install &&\
|
meson setup .. && meson configure -D default_library=both &&\
|
||||||
|
ninja && ninja install &&\
|
||||||
rm -f -r /tmp/fuse-${LIBFUSE_VERSION}*
|
rm -f -r /tmp/fuse-${LIBFUSE_VERSION}*
|
||||||
|
|
||||||
|
ENV LANG=zh_CN.UTF-8
|
||||||
|
ENV LANGUAGE=zh_CN:zh
|
||||||
|
ENV LC_ALL=zh_CN.UTF-8
|
||||||
Reference in New Issue
Block a user