David 3 mēneši atpakaļ
vecāks
revīzija
358cb8e643
3 mainītis faili ar 58 papildinājumiem un 12 dzēšanām
  1. 39 0
      Dockerfile
  2. 19 0
      requirements.txt
  3. 0 12
      test.py

+ 39 - 0
Dockerfile

@@ -0,0 +1,39 @@
+# 使用官方CentOS 7基础镜像
+FROM centos:xnyV1.3
+
+# 安装基础依赖
+RUN yum -y update && \
+    yum -y groupinstall "Development Tools" && \
+    yum -y install \
+    openssl-devel \
+    bzip2-devel \
+    libffi-devel \
+    wget \
+    && yum clean all
+
+# 安装Python 3.12
+RUN cd /tmp && \
+    wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz && \
+    tar xzf Python-3.12.0.tgz && \
+    cd Python-3.12.0 && \
+    ./configure --enable-optimizations && \
+    make altinstall && \
+    ln -s /usr/local/bin/python3.12 /usr/local/bin/python3 && \
+    ln -s /usr/local/bin/pip3.12 /usr/local/bin/pip3
+
+# 安装MongoDB
+RUN echo -e "[mongodb-org-6.0]\nname=MongoDB Repository\nbaseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/6.0/x86_64/\ngpgcheck=1\nenabled=1\ngpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc" > /etc/yum.repos.d/mongodb-org-6.0.repo && \
+    yum -y install mongodb-org && \
+    mkdir -p /data/db && \
+    chown -R mongod:mongod /data/db \
+
+WORKDIR /home/app
+# 部署应用程序
+COPY ./compete/app/ .
+
+# 安装Python依赖
+RUN pip3 install --no-cache-dir -r /app/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
+
+# 配置容器启动
+EXPOSE 27017
+CMD ["sh", "-c", "mongod --fork --logpath /var/log/mongodb.log"]

+ 19 - 0
requirements.txt

@@ -0,0 +1,19 @@
+pymongo==4.7.3
+pandas==2.2.3
+SQLAlchemy==2.0.39
+PyMySQL==1.1.1
+Flask==3.0.2
+waitress==2.1.2
+requests==2.31.0
+numpy== 1.26.0
+scikit-learn== 1.6.1
+plotly==5.18.0
+lightgbm==4.5.0
+joblib==1.3.2
+tensorflow==2.16.1
+matplotlib==3.10.0
+protobuf==3.20.3
+APScheduler==3.10.4
+paramiko==3.5.0
+PyYAML==6.0.1
+keras==3.8.0

+ 0 - 12
test.py

@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-# -*- coding:utf-8 -*-
-# @FileName  :test.py
-# @Time      :2025/3/25 10:07
-# @Author    :David
-# @Company: shenyang JY
-
-
-if __name__ == "__main__":
-    feas = "temperature190,temperature10,direction160,direction40,temperature110,speed60,direction80,mcc,temperature150,speed20,speed110,globalr,solarZenith,speed190,direction120,direction200,temperature90,speed150,temperature50,direction30,temperature160,direction170,temperature20,direction70,direction130,temperature200,speed70,temperature120,speed30,speed100,speed80,speed180,dniCalcd,speed140,temperature60,temperature170,temperature30,direction20,humidity2,direction180,direction60,direction140,hcc,speed40,clearskyGhi,temperature130,lcc,speed90,tcc,temperature2,speed170,direction100,temperature70,speed130,direction190,temperature40,direction10,temperature180,direction150,direction50,speed50,direction90,temperature100,speed10,temperature140,speed120,speed200,radiation,tpr,surfacePressure,direction110,speed160,temperature80"
-    feass = feas.split(",")
-    print(len(feass))