-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (35 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
41 lines (35 loc) · 1.38 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
# UCAgent Docker Image
# Based on picker base image with verification tools
FROM ghcr.io/xs-mlvp/picker:latest
# Install Node.js, npm, and Python 3.11
USER root
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get update && apt-get install -y time nodejs python3.11 python3.11-dev python3.11-venv && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
update-alternatives --install /usr/bin/pip3 pip3 /usr/local/bin/pip3.11 1 && \
rm -rf /var/lib/apt/lists/* && \
npm install -g npm@latest
# Set working directory
WORKDIR /workspace/ucagent
# Copy project files
COPY requirements.txt pyproject.toml ./
COPY examples/Formal/requirements.txt ./requirements-formal.txt
COPY ucagent/ ./ucagent/
COPY examples/ ./examples/
COPY config.yaml ./
COPY ucagent.py ./
COPY Makefile ./
COPY README.en.md README.zh.md ./
COPY LICENSE ./
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONPATH=/workspace/ucagent \
PATH=/home/user/.local/bin:$PATH
# Install UCAgent and dependencies as user with --user flag
RUN pip3 install . && \
pip3 install -r requirements-formal.txt && \
node --version && npm --version && python3 --version && ucagent --check
# Default command: interactive shell
CMD ["/bin/bash"]