网站首页 > 基础教程 正文
CentOS 9, 安装 Docker
CentOS 9 系统Docker安装步骤,请参照文章: CentOS 9 dnf 安装 Docker, 配置阿里云 Docker 镜像(
https://www.toutiao.com/article/7503392130052669993/)
mlflow Dockerfile
# Use an official Miniconda runtime as a parent image
FROM continuumio/miniconda3
# Set the working directory in the container
WORKDIR /NN
# Copy the current directory contents into the container at /NN
COPY . /NN
# Configure Conda to use the Tsinghua mirror
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
RUN conda config --set show_channel_urls yes
# Create a Conda environment
RUN conda create -n mlflow_env python=3.10 -y
# Activate the Conda environment
ENV PATH=/opt/conda/envs/mlflow_env/bin:$PATH
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Export the installed package versions to requirements.txt
RUN pip freeze > requirements.txt
# Make port 5001 available to the world outside this container
EXPOSE 5001
# Define environment variable
ENV NAME=Dev
# Run app.py when the container launches
CMD ["mlflow", "server", "--host", "0.0.0.0", "--port", "5001"]
requirements.txt内容如下:
mlflow==2.17.2
numpy
matplotlib
scikit-learn
编译 Docker 镜像
sudo docker build -t mlflow_py310:2.17.2 .
运行 Docker容器
sudo docker run -p 5001:5001 -v $(pwd):/app -v $(pwd)/mlruns:/app/mlruns mlflow_py310:2.17.2
# sudo docker exec -it 61adaef519c5 /bin/bash
猜你喜欢
- 2025-05-15 Filebeat es 同步服务器日志到es
- 2025-05-15 docker容器的使用以及部署mysql
- 2025-05-15 一、docker部署ollama同时分别运行gemma3:27b bge-m3 deepseek-r1
- 2025-05-15 聊聊部署在docker容器里面的springboot项目如何启用arthas
- 2025-05-15 Docker容器化部署Java应用的最佳实践
- 2025-05-15 「linux」如何使用docker部署c/c++程序
- 2025-05-15 Docker安装MySQL 8、Redis并确保数据持久化的详细步骤
- 2025-05-15 Flask Docker Demo 项目指南
- 2025-05-15 彻底搞懂容器启动、停止、调试的每一个细节!
- 2025-05-15 Mac安装Docker及使用
- 最近发表
- 标签列表
-
- jsp (69)
- gitpush (78)
- gitreset (66)
- python字典 (67)
- dockercp (63)
- gitclone命令 (63)
- dockersave (62)
- linux命令大全 (65)
- pythonif (86)
- location.href (69)
- dockerexec (65)
- tail-f (79)
- queryselectorall (63)
- location.search (79)
- bootstrap教程 (74)
- deletesql (62)
- linuxgzip (68)
- 字符串连接 (73)
- html标签 (69)
- c++初始化列表 (64)
- mysqlinnodbmyisam区别 (63)
- arraylistadd (66)
- mysqldatesub函数 (63)
- window10java环境变量设置 (66)
- c++虚函数和纯虚函数的区别 (66)