gradio-osprey-demo

创建需要的dockerfle

###################

使用 Ubuntu 作为基础镜像

FROM nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04

更新软件包列表并安装依赖项

RUN apt update && \

apt install -y python3 python3-pip git ffmpeg libsm6 libxext6 curl wget vim libgl1 && \

cp /usr/bin/python3 /usr/bin/python && \

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \

pip install git+https://github.com/facebookresearch/segment-anything.git && \

pip install opencv-python pycocotools matplotlib onnxruntime onnx

设置 Node.js 环境变量

ENV NODE_OPTIONS="--max-old-space-size=8192"

安装 nvm、Node.js 和 pnpm

ENV NVM_DIR /root/.nvm

RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && . ~/.bashrc && nvm install v18.16.0

RUN . NVM_DIR/nvm.sh \&\& ln -s NVM_DIR/(nvm current) NVM_DIR/cur && ln -s NVM_DIR/versions/node/(nvm current) $NVM_DIR/versions/node/cur

ENV NODE_PATH $NVM_DIR/cur/lib/node_modules

ENV PATH NVM_DIR/versions/node/cur/bin:PATH

ADD pnpm /usr/local/bin/

RUN chmod a+x /usr/local/bin/pnpm

设置环境变量

ENV NODE_OPTIONS=--max_old_space_size=6000

克隆并安装 Gradio 应用

RUN git clone https://github.com/LiWentomng/gradio-osprey-demo.git && \

cd gradio-osprey-demo && \

bash scripts/build_frontend.sh && \

pip install -e .

设置工作目录

WORKDIR /gradio-osprey-demo

可选:暴露端口

EXPOSE <port>

可选:指定容器启动时的命令

CMD sleep 10000000000

相关推荐
Amumu121381 小时前
TypeScript学习: 进阶知识
开发语言·学习·typescript
用户302822530685 小时前
AI 视频图片运镜为什么会抖?帧率拉高也救不了多次取整
前端·人工智能·typescript
htzyl20610 小时前
TypeScript:tsconfig配置误区及详情介绍,让你清清楚楚
前端·typescript
疯华整猫10 小时前
类型全对、tsc 零错误,上线却白屏:AI 时代学 TypeScript,学的是它替不了的那一层
前端·typescript
king王一帅12 小时前
啃完几十份国标,QuireKit 实现了像 Word 一样流畅的浏览器 OFD 编辑器,支持完备电子签标准与 OFD-H
前端·typescript·产品
htzyl2061 天前
TypeScript中替代enum的五种方案
前端·typescript
钱栈up2 天前
GitHub 热榜上手|Astryx:一周 +1.3 万 star 的 Agent 设计系统
typescript·开源·github
夕水2 天前
我给我的诗写了个后台,顺手写了 一个组件库ew-solid-ui
前端·javascript·typescript
Sakura_j_h_2 天前
TypeScript 7.0 换 Go 编译器后,我先在 6.0 清完默认值
javascript·golang·typescript·vite·前端工程化·tsc
钱栈up3 天前
GitHub 热榜上手|T3 Code:手机远程操控 7 款 AI 编程 Agent
typescript·开源·github