This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:bullseye-slim as base | |
RUN apt update && apt install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev | |
RUN curl https://pyenv.run | bash | |
RUN $HOME/.pyenv/bin/pyenv install 3.11.0 | |
FROM dockcross/linux-armv6-lts | |
COPY --from=base /root/.pyenv /root/.pyenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16.14.2-alpine3.15 as client-builder | |
RUN apk update | |
RUN apk add git protoc | |
RUN mkdir /grpc | |
WORKDIR /grpc | |
RUN git clone -b 1.3.1 https://github.com/grpc/grpc-web | |
WORKDIR /grpc/grpc-web/net/grpc/gateway/examples/helloworld | |
RUN npm install | |
RUN wget -O /usr/local/bin/protoc-gen-grpc-web https://github.com/grpc/grpc-web/releases/download/1.3.1/protoc-gen-grpc-web-1.3.1-linux-x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import time | |
from contextvars import ContextVar | |
from typing import Optional | |
TOKEN: ContextVar[Optional[str]] = ContextVar("token", default=None) | |
class Lock: | |
def __init__(self, name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from ffmpeg._run import Error, compile | |
from ffmpeg._utils import convert_kwargs_to_cmd_line_args | |
from asyncio import create_subprocess_exec, subprocess, wait_for | |
async def probe(filename, cmd='ffprobe', timeout=None, **kwargs): | |
args = [cmd, '-show_format', '-show_streams', '-of', 'json'] | |
args += convert_kwargs_to_cmd_line_args(kwargs) |