-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.validator
More file actions
53 lines (40 loc) · 1.03 KB
/
Dockerfile.validator
File metadata and controls
53 lines (40 loc) · 1.03 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
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
curl \
git \
build-essential \
gcc-11 \
g++-11 \
libstdc++-11-dev \
pkg-config \
openssl \
libssl-dev \
libopenblas-dev \
liblapack-dev \
libx11-dev \
cmake \
libglib2.0-dev \
libgtk-3-dev \
libsoup2.4-dev \
libwebkit2gtk-4.0-dev \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g pm2
# Install Rust and Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
WORKDIR /app
COPY pyproject.toml poetry.lock /app/
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-root
RUN poetry run pip install bittensor-cli==9.1.0
COPY . /app
ENV PYTHONPATH="/app"
# Make startup scripts executable
RUN chmod +x start_validator.sh
CMD ["/bin/bash", "-c", "/app/start_validator.sh"]