
motion-base 是一个Web应用,旨在提供统一入口访问和处理来自不同国家数据库的地震动记录。它包含Web界面和Python客户端,支持通过编程方式访问数据。
查看演示网站。
!https://raw.githubusercontent.com/TLCFEM/motion-base/refs/heads/master/docs/screenshot.png
适用于地震工程研究、地震动数据分析、相关领域开发等场景,可帮助用户高效获取、处理和分析多来源地震动数据。
确保系统已安装 docker、curl 和 jq。以下命令将下载 example.sh 脚本并执行,拉取镜像并上传示例数据到应用:
bashcurl -s https://raw.githubusercontent.com/TLCFEM/motion-base/refs/heads/master/scripts/example.sh -o example.sh && bash example.sh
执行前建议检查脚本内容(尤其是来自互联网的脚本)。以下是脚本的操作演示:
https://raw.githubusercontent.com/TLCFEM/motion-base/refs/heads/master/docs/demo.gif]([***]
作为开发者
bash# 1. 克隆项目 git clone https://github.com/TLCFEM/motion-base.git cd motion-base # 2. 创建虚拟环境并安装Python依赖 python -m venv .venv source .venv/bin/activate pip install -e .[dev,client] # 3. 安装Node.js依赖 cd gui pnpm install cd ..
开发环境无需额外配置。本地运行应用:
bash# 1. 启动mongodb和rabbitmq docker compose -f docker/docker-compose.yml up -d # 2. 启动后端 python ./mb_runner.py # 3. 启动celery workers python ./mb_runner.py celery # 4. 启动前端 cd gui pnpm dev
分别使用 back.Dockerfile 和 front.Dockerfile 构建后端和前端Docker镜像。
作为主机部署
部署应用需两个文件:.env 和 docker-compose-production.yml。
bashmkdir motion-base && cd motion-base wget https://raw.githubusercontent.com/TLCFEM/motion-base/master/docker/.env wget https://raw.githubusercontent.com/TLCFEM/motion-base/master/docker/docker-compose-production.yml # 编辑.env文件设置正确值(或通过其他方式设置环境变量) docker compose -f docker-compose-production.yml up -d
应用可直接运行,但建议检查并调整设置。推荐每个容器一个进程,通过水平扩展应用。可参考 docker/docker-compose-production-nginx.yaml 示例,需同时获取 docker/nginx.conf.sh:
bashmkdir motion-base && cd motion-base wget https://raw.githubusercontent.com/TLCFEM/motion-base/master/docker/.env wget https://raw.githubusercontent.com/TLCFEM/motion-base/master/docker/nginx.conf.sh wget https://raw.githubusercontent.com/TLCFEM/motion-base/master/docker/docker-compose-production-nginx.yml docker compose -f docker-compose-production-nginx.yml up -d
也可使用Kubernetes、Docker Swarm等工具部署。
作为分析师
bash# 1. 克隆项目 git clone https://github.com/TLCFEM/motion-base.git cd motion-base # 2. 创建虚拟环境并安装Python依赖 python -m venv .venv source .venv/bin/activate pip install .[client]
使用客户端访问数据:
pythonimport anyio from mb.client import MBClient api_url = "http://应用部署地址" async def search(): async with MBClient(api_url) as client: results = await client.search({"min_magnitude": 6.0, "min_pga": 200.0}) for r in results: print(r) if __name__ == "__main__": anyio.run(search)
从数据源下载原始数据后,可上传至应用:
pythonimport anyio from mb.client import MBClient # 假设应用本地运行 api_url = "http://localhost:8000" # 使用默认凭据 username = "test" password = "password" region = "jp" # 假设当前文件夹包含待上传文件 async def upload(): async with MBClient(api_url, username, password) as client: await client.upload(region, '.') if __name__ == "__main__": anyio.run(upload)
日本
原始数据可从强震观测网获取。ASCII格式的波形文件 *.EW、*.NS 和 *.UD 可上传并解析。
新西兰
原始数据可从强震数据产品获取。波形文件 *.V1A 和 *.V2A 可上传并解析。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务