forked from StarlightSearch/EmbedAnything
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.Dockerfile
More file actions
56 lines (47 loc) · 1.45 KB
/
release.Dockerfile
File metadata and controls
56 lines (47 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Use NVIDIA CUDA base image
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04
# Set non-interactive mode and timezone
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
# Set working directory
WORKDIR /app
# Update package list and install basic dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
software-properties-common \
tzdata \
&& rm -rf /var/lib/apt/lists/*
# Add deadsnakes PPA and install Python versions
RUN add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get update && \
apt-get install -y \
python3.10 \
python3.11 \
python3.12 \
python3.13 \
python3.14 \
python3.12-venv \
python3.11-venv \
python3.13-venv \
python3.14-venv \
python3-pip \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Clone the repository and checkout cuda branch
RUN git clone https://github.com/StarlightSearch/EmbedAnything.git && \
cd EmbedAnything && \
git checkout cuda
# Set working directory to the cloned repo
WORKDIR /app/EmbedAnything
# Create Python virtual environment and install dependencies
RUN python3.11 -m venv /opt/embed_env && \
/opt/embed_env/bin/pip install --upgrade pip && \
/opt/embed_env/bin/pip install maturin[patchelf] auditwheel
# Activate virtual environment by default
ENV PATH="/opt/embed_env/bin:$PATH"