luowenyang commited on
Commit
e63bddb
·
verified ·
1 Parent(s): 7e62c85

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +61 -0
Dockerfile ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/realm/swiftlint:0.59.1
2
+
3
+ ENV USER=root
4
+ ENV HOME=/root
5
+ WORKDIR $HOME
6
+
7
+ ARG DEBIAN_FRONTEND=noninteractive
8
+ RUN cat /proc/version \
9
+ # RUN echo 'deb http://mirrors.tecent.com/debian bullseye main contrib non-free\n\
10
+ # deb http://mirrors.tecent.com/debian-security bullseye-security main contrib non-free\n\
11
+ # deb http://mirrors.tecent.com/debian bullseye-updates main contrib non-free' > /etc/apt/sources.list
12
+ && apt-get update \
13
+ && apt-get install -y python3 python3-pip python-is-python3 npm php-cli shellcheck rubocop cppcheck clang-tidy mono-complete unzip wget curl git \
14
+ && apt-get clean \
15
+ && rm -rf /var/lib/apt/lists/*
16
+ RUN pip3 install uv --break-system-packages -i https://mirrors.cloud.tencent.com/pypi/simple
17
+ RUN uv venv
18
+ RUN . /root/.venv/bin/activate
19
+ RUN uv pip install ruff sqlfluff pyarrow pandas tqdm -i https://mirrors.cloud.tencent.com/pypi/simple
20
+ RUN wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.14.0/pmd-dist-7.14.0-bin.zip && \
21
+ unzip pmd-dist-7.14.0-bin.zip -d /opt && \
22
+ ln -s /opt/pmd-bin-7.14.0/bin/pmd /usr/local/bin/pmd
23
+ RUN wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar && \
24
+ chmod +x phpstan.phar && mv phpstan.phar /usr/local/bin/phpstan
25
+ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
26
+ /root/.cargo/bin/rustup component add clippy && \
27
+ ln -s /root/.cargo/bin/clippy-driver /usr/local/bin/clippy-driver
28
+ RUN wget https://go.dev/dl/go1.23.10.linux-amd64.tar.gz && \
29
+ tar -C /usr/local -xzf go1.23.10.linux-amd64.tar.gz && \
30
+ /usr/local/go/bin/go install honnef.co/go/tools/cmd/staticcheck@latest && \
31
+ /usr/local/go/bin/go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \
32
+ ln -s /root/go/bin/staticcheck /usr/local/bin/staticcheck && \
33
+ ln -s /root/go/bin/golangci-lint /usr/local/bin/golangci-lint
34
+ RUN npm install -g eslint
35
+ RUN apt-get update
36
+ RUN apt-get install -y openjdk-11-jdk
37
+ ENV PATH=/root/.venv/bin/ruff:$PATH:/root/.cargo/bin:/usr/local/go/bin
38
+
39
+ RUN echo "===== 工具版本检查 =====" && \
40
+ python3 --version && \
41
+ pip3 --version && \
42
+ ruff --version && \
43
+ sqlfluff --version && \
44
+ cppcheck --version && \
45
+ clang-tidy --version && \
46
+ php --version && \
47
+ phpstan --version || true && \
48
+ pmd --version && \
49
+ rustc --version && \
50
+ clippy-driver --version && \
51
+ go version && \
52
+ staticcheck --version && \
53
+ golangci-lint --version && \
54
+ eslint --version && \
55
+ shellcheck --version && \
56
+ rubocop --version && \
57
+ mcs --version && \
58
+ swiftlint version
59
+
60
+ ENV LANG='en_US.UTF-8'
61
+ ENV LANGUAGE='en_US:en'