This commit is contained in:
AF 2023-10-03 22:29:15 +00:00
parent 33d8daee79
commit 18ed2c094c
13 changed files with 42 additions and 16 deletions

View File

@ -28,6 +28,8 @@ services:
- radn-rs:/code/:ro
networks:
radn: {}
tty: true
stop_signal: SIGINT
book-monads:
container_name: book-monads
build:

View File

@ -5,7 +5,7 @@ RUN git clone https://gitea.parrrate.ru/PTV/radn-rs.git
WORKDIR /code/radn-rs/
COPY metrics.py /code/metrics.py
RUN git fetch && git checkout 1a8d70957b7d0f3f08f1c0f11ff04ebc007a6b48
RUN git fetch && git checkout dc98e38b8fbc10e6329c86cad110ce653b94eafd
RUN --mount=type=cache,target=/code/cache/ python3 /code/metrics.py
FROM python:3.11

View File

@ -13,8 +13,8 @@ server {
root /usr/share/nginx/html;
}
location /live/docs/ {
proxy_pass http://radn-rs-dd/;
location /latest/docs {
proxy_pass http://buildbot-nginx/docs/radn-rs;
}
}
@ -23,6 +23,22 @@ map $http_upgrade $connection_upgrade {
'' close;
}
server {
listen 80;
listen [::]:80;
server_name radn-live.parrrate.ru;
location / {
proxy_pass http://radn-rs-dd/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_buffering off;
}
}
server {
listen 80;
listen [::]:80;

View File

@ -1,10 +1,10 @@
FROM rust:1.69
FROM rust:1.72
RUN cargo install cargo-watch
RUN rustup component add rustfmt
RUN rustup component add clippy
RUN cargo install mdbook
RUN cargo install rust-code-analysis-cli
RUN apt-get update && install -y cloc
RUN apt-get update && apt-get install -y cloc
WORKDIR /code/

View File

@ -1,4 +1,4 @@
FROM rust:1.69
FROM rust:1.72
RUN cargo install mdbook

View File

@ -1,4 +1,4 @@
FROM rust:1.69
FROM rust:1.72
RUN cargo install mdbook

View File

@ -1,4 +1,4 @@
FROM rust:1.69
FROM rust:1.72
RUN cargo install mdbook

View File

@ -1,7 +1,5 @@
FROM node:19
RUN npm install -g http-server
RUN npm install -g browser-sync
WORKDIR /code/radn-rs/target/doc/
CMD [ "http-server", "-p", "80" ]
CMD [ "browser-sync", "start", "-w", "--ss", "/code/radn-rs/target/doc/", "-s", "/code/radn-rs/target/doc/", "--directory", "--no-open", "--port", "80" ]

View File

@ -10,7 +10,13 @@ ENV SRCPATTERN="./build/src/**/*.cs"
FROM metrics-base as metrics-radn
RUN git clone https://gitea.parrrate.ru/PTV/radn-rs.git repo
WORKDIR /code/repo/
RUN git fetch && git checkout 1a8d70957b7d0f3f08f1c0f11ff04ebc007a6b48
RUN git fetch && git checkout dc98e38b8fbc10e6329c86cad110ce653b94eafd
FROM metrics-base as metrics-meta
RUN git clone https://gitea.parrrate.ru/PTV/radn-dev.git repo
WORKDIR /code/repo/
RUN git fetch && git checkout 33d8daee79e53fc0eded5f7d56486f68aac4d26d
ENV SRCPATTERN="./*metrics/**/*"
FROM metrics-base as metrics-mdbook
RUN git clone https://github.com/rust-lang/mdBook.git repo
@ -45,7 +51,7 @@ RUN git fetch && git checkout f81543a34ee363dcc00e8632fd7cfcd4a3478b23
ENV SRCDIR="."
ENV SRCPATTERN="./**/*.[ach]*"
FROM metrics-rust as metrics-repo
FROM metrics-radn as metrics-repo
FROM metrics-repo as metrics-commits
COPY common.py /code/common.py

View File

@ -6,6 +6,6 @@ from k2c import k2c
with open("Y.dat", "rb") as file:
Y = pickle.load(file)
M = Y.shape[0]
K = np.arange(M) / M
K = (np.arange(M) + .5) / M
with open("C.dat", "wb") as file:
pickle.dump(k2c(K), file)

View File

@ -4,7 +4,7 @@ from subprocess import check_output
from common import set_
BITS = 2
BITS = 10
def mask(height: int) -> int:

View File

@ -1,11 +1,13 @@
import pickle
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
plt.rcParams["figure.figsize"] = [18, 9]
plt.style.use("dark_background")
plt.subplots_adjust(left=0.05, right=0.99, top=0.95, bottom=0.05)
plt.margins(x=0.025)
plt.gca().xaxis.set_major_locator(MaxNLocator(integer=True))
with open("Y.dat", "rb") as file:
Y = pickle.load(file)

View File

@ -1,11 +1,13 @@
import pickle
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
plt.rcParams["figure.figsize"] = [18, 9]
plt.style.use("dark_background")
plt.subplots_adjust(left=0.05, right=0.99, top=0.95, bottom=0.05)
plt.margins(x=0.025)
plt.gca().xaxis.set_major_locator(MaxNLocator(integer=True))
with open("entries.dat", "rb") as file:
entries_t = pickle.load(file)