-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
42 lines (37 loc) · 1.92 KB
/
Dockerfile
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
# DockerName: Locust runner
# Usecase: With locust runtime dependentance tools and testsuites
# Update: 2021-03-30
# Dependents: python3
# Arch: x86-64
# Version: v0.5.0
# Editor:thomas
# Build In China
FROM mltooling/ml-workspace:0.12.1
ENV PYTHON_HOME /usr/bin/python3
WORKDIR /home/
# 如果在国内环境,先下载go安装包
# COPY docker-build/go1.16.2.linux-amd64.tar.gz .
# && go env -w GOPROXY=https://goproxy.cn,direct \
# && pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple \
# && pip config set install.trusted-host https://repo.huaweicloud.com \
RUN sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak \
&& sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list \
&& sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list \
&& apt update \
&& wget https://dl.google.com/go/go1.16.3.linux-amd64.tar.gz \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz \
&& export PATH=$PATH:/usr/local/go/bin \
&& git clone -b master https://haiyuan.bian:[email protected]/apulis/MachineWolf.git \
&& cd /home/MachineWolf/ \
&& git pull origin master \
&& pip install python-dev-tools \
&& pip install -U --ignore-installed -r /home/MachineWolf/requirements.ini \
&& bzt /home/MachineWolf/example/jmeter/trace_user_footprint.jmx \
&& rm -rf /tmp/*
# port
# EXPOSE 1099 8080 8088 8089
# Build example
# docker build -f MachineWolf/Dockerfile . -t harbor.apulis.cn:8443/testops/machinewolf:latest
# docker push harbor.apulis.cn:8443/testops/machinewolf:latest
# Run example
# docker run -d -p 8088:8080 --name "ml-workspace" -v "${PWD}:/workspace" --env NOTEBOOK_ARGS="--NotebookApp.notebook_dir=/home" --shm-size 2048m --restart always harbor.apulis.cn:8443/testops/machinewolf:latest