This commit is contained in:
Ufnow 2020-04-22 01:28:40 +02:00
parent 2451e45321
commit 2ab65dafa0
3 changed files with 37 additions and 28 deletions

View File

@ -1,14 +1,14 @@
FROM ubuntu:latest FROM python:3
RUN apt update -y && apt install -y make RUN apt update -y && apt install -y make
RUN apt install -y git RUN apt install -y git
RUN apt install -y gcc RUN apt install -y gcc
RUN gcc --version RUN gcc --version
RUN apt install -y build-essential RUN apt install -y build-essential
RUN apt install -y moreutils
RUN python --version
RUN git clone https://github.com/usnistgov/SCTK.git RUN git clone https://github.com/usnistgov/SCTK.git
WORKDIR SCTK WORKDIR SCTK
RUN make config && make all && make check && make install && make doc RUN make config && make all && make check && make install && make doc
ENV PATH=$PATH:/SCTK/bin ENV PATH=$PATH:/SCTK/bin
RUN apt-get update && apt-get install -y python3 RUN pip install matplotlib
RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install matplotlib

View File

@ -18,10 +18,8 @@ pipeline {
stage('Plots') stage('Plots')
{ {
steps { steps {
sh label: '', script: 'chmod a+rwx ./wykres.py' sh label: 'WER plot', script: './wykres.py wer.txt wer.png'
sh label: '', script: './wykres.py' sh label: 'SRR plot', script: './wykres.py srr.txt srr.png'
archiveArtifacts 'wer.png'
archiveArtifacts 'srr.png'
} }
} }
stage('ArchiveArtifacts') stage('ArchiveArtifacts')

View File

@ -1,26 +1,37 @@
#!/usr/bin/env python
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import sys
fig_wer, ax_wer = plt.subplots()
fig_srr, ax_srr = plt.subplots()
X1, Y1 = [], [] def read_file(filename):
X2, Y2 = [], [] values = []
y_num = 1 with open(filename) as f:
for line in open('wer.txt', 'r'): for line in f:
Y1.append(float(line[:-1])) values.append(float(line.rstrip('\n')))
X1.append(y_num) return values
y_num = y_num + 1
ax_wer.plot(X1, Y1)
ax_wer.set_title("WER")
fig_wer.savefig('wer.png')
y_num = 1 def main():
for line in open('srr.txt', 'r'): input_file = sys.argv[1]
Y2.append(float(line[:-1])) output_file = sys.argv[2]
X2.append(y_num)
y_num = y_num + 1
ax_srr.plot(X2, Y2) # Get values
ax_srr.set_title("SRR") values = read_file(input_file)
fig_srr.savefig('srr.png')
# Setup values
plt.plot(values)
# Set x-label to 'executes'
plt.xlabel('executes')
# Set y-label to 'executes'
ylabel_name = input_file.split('.')[0]
plt.ylabel(ylabel_name)
# Save fig with 800 dpi
plt.savefig(output_file, dpi=800)
plt.close()
if __name__ == "__main__":
main()