Explorar o código

add assets docker

Y hai 1 mes
pai
achega
6aa4825ec0

BIN=BIN
assets/first_design.png


+ 8 - 0
docker/data_analyze

@@ -0,0 +1,8 @@
+FROM pytorch/pytorch:2.6.0-cuda12.6-cudnn9-runtime
+WORKDIR /app
+COPY . .
+RUN pip install --no-cache-dir -r requirements.txt \
+    && rm /app/requirements.txt
+RUN mkdir -p /app/workspace \
+    && mkdir -p /app/model
+CMD [ "python", "server.py"]

+ 5 - 0
docker/data_analyze-test

@@ -0,0 +1,5 @@
+FROM data_analyze:1.0
+RUN rm -rf /app
+WORKDIR /app
+COPY . .
+CMD [ "python", "server.py"]

+ 41 - 0
docker/data_analyze.env

@@ -0,0 +1,41 @@
+# 服务端口
+PORT=8067
+
+# 文件访问地址
+FILE_URL=http://10.41.1.220:8067
+
+# API 密钥(需要手动填写)
+API_KEY=sk-04b63960983445f980d85ff185a17876
+
+# LLM 通用服务地址
+BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
+
+# LLM 模型配置
+MODEL=qwen-max
+MODEL_TEM_TURE=0.5
+
+THINK_MODEL=deepseek-r1
+THINK_MODEL_TEM_TURE=0.7
+
+PLUS_MODEL=qwen-plus
+PLUS_MODEL_TEM_TURE=0.7
+
+TURBO_MODEL=qwen-turbo
+TURBO_MODEL_TEM_TURE=0.7
+
+CODE_WRITE_MODEL=max
+CODE_EXECUTE_MODEL=max
+SQL_MODEL=max
+FUNC_MODEL=max
+# 静态文件和上传路径
+STATIC_DIR=/workspace
+BASE_UPLOAD_DIRECTORY=/app/workspace
+
+# 语音识别模型及设备
+STT_MODEL=/app/model/paraformer-zh
+STT_DEVICE=cpu
+VAD_MODEL=/app/model/fsmn-vad
+PUNC_MODEL=/app/model/ct-punc
+
+# BGE 模型路径
+BGE_MODEL=/app/model/bge-reranker-v2-m3

+ 20 - 0
docker/data_analyze.yml

@@ -0,0 +1,20 @@
+version: '2'
+services:
+  app:
+    image: data_analyze:2.0
+    container_name: data_analyze
+    network_mode: host
+    # ports:
+    #   - "8067:8067"
+    volumes:
+      - /model:/app/model
+      - /workspace:/app/workspace
+      - /var/run/docker.sock:/var/run/docker.sock 
+      - /usr/bin/docker:/usr/bin/docker 
+    env_file: ./data_analyze.env
+    deploy:
+      resources:
+        reservations:
+          devices:
+            - driver: nvidia
+              capabilities: ["gpu"]

+ 42 - 0
docker/data_analyze_test.env

@@ -0,0 +1,42 @@
+# 服务端口
+PORT=8067
+
+# 文件访问地址
+FILE_URL=http://10.41.1.220:8067
+
+# API 密钥(需要手动填写)
+API_KEY=sk-04b63960983445f980d85ff185a17876
+
+# LLM 通用服务地址
+# BASE_URL=http://129.211.174.245:8777/v1
+BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
+
+# LLM 模型配置
+MODEL=qwen-max
+MODEL_TEM_TURE=0.5
+
+THINK_MODEL=deepseek-r1
+THINK_MODEL_TEM_TURE=0.7
+
+PLUS_MODEL=qwen-plus
+PLUS_MODEL_TEM_TURE=0.7
+
+TURBO_MODEL=qwen-turbo
+TURBO_MODEL_TEM_TURE=0.7
+
+CODE_WRITE_MODEL=max
+CODE_EXECUTE_MODEL=max
+SQL_MODEL=max
+FUNC_MODEL=max
+# 静态文件和上传路径
+STATIC_DIR=/workspace
+BASE_UPLOAD_DIRECTORY=/workspace
+
+# 语音识别模型及设备
+STT_MODEL=/model/paraformer-zh
+STT_DEVICE=cpu
+VAD_MODEL=/model/fsmn-vad
+PUNC_MODEL=/model/ct-punc
+
+# BGE 模型路径
+BGE_MODEL=/model/bge-reranker-v2-m3

+ 40 - 0
docker/dockerjupyter

@@ -0,0 +1,40 @@
+FROM quay.io/jupyter/docker-stacks-foundation
+
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+
+USER root
+RUN mkdir /workspace
+RUN chmod 777 -R /workspace
+RUN mamba install --yes \
+    jupyter_kernel_gateway \
+    ipykernel \
+    matplotlib \
+    numpy \
+    pandas \
+    seaborn \
+    pyecharts[all] \
+    scipy \
+    scikit-learn\
+    PyYAML\
+    pillow\
+    numba\
+    matplotlib-inline\
+    MarkupSafe\
+    six\
+    requests \
+    openpyxl && \
+    mamba clean --all -f -y && \
+    fix-permissions "${CONDA_DIR}" && \
+    fix-permissions "/workspace"
+
+ENV TOKEN="UNSET"
+CMD python -m jupyter kernelgateway \
+    --KernelGatewayApp.ip=0.0.0.0 \
+    --KernelGatewayApp.port=8888 \
+    --KernelGatewayApp.auth_token="${TOKEN}" \
+    --JupyterApp.answer_yes=true \
+    --JupyterWebsocketPersonality.list_kernels=true
+
+EXPOSE 8888
+
+WORKDIR /workspace

+ 19 - 0
docker/requirements.txt

@@ -0,0 +1,19 @@
+pandas
+numpy
+requests
+websocket
+websocket-client
+openpyxl
+numba
+pillow
+PyYAML
+jupyter_kernel_gateway
+ipykernel
+matplotlib
+seaborn
+pyecharts[all]
+scipy
+scikit-learn
+matplotlib-inline
+MarkupSafe
+six