Skip to content

Commit bb7e41e

Browse files
authored
Docker container for devel (whitphx#735)
* Create Dockerfile * Fix Dockerfile * Update pyarrow and pylibsrtp * Remove deepspeech * Remove build-essential and cmake * Add ffmpeg * Revert "Remove deepspeech" This reverts commit 16c80af. * Revert "Update pyarrow and pylibsrtp" This reverts commit f035a7e. * Add docker/build rule * Update make rules * Update docker/run rule * Remove unnecessary redundant package related to libgl * Update Makefile * Update docker-related rules in Makefile * Remove port binding
1 parent df26505 commit bb7e41e

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.9
2+
3+
RUN apt-get update && apt-get install -y \
4+
ffmpeg \
5+
libgl1 \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
ENV POETRY_VIRTUALENVS_IN_PROJECT=false
9+
10+
RUN pip install -U poetry
11+
12+
ADD pyproject.toml /srv/pyproject.toml
13+
ADD poetry.lock /srv/poetry.lock
14+
15+
WORKDIR /srv
16+
17+
RUN poetry install

Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,29 @@ format:
77
isort .
88
black .
99
flake8
10+
11+
docker/build:
12+
# Set `--platform linux/amd64` because some packages do not work with Docker on M1 mac for now.
13+
docker build \
14+
--platform linux/amd64 \
15+
-t streamlit-webrtc \
16+
.
17+
18+
docker/run:
19+
docker run \
20+
--rm \
21+
-it \
22+
-p 8501:8501 \
23+
-v `pwd`:/srv \
24+
streamlit-webrtc \
25+
poetry run streamlit run app.py
26+
27+
docker/shell:
28+
docker run \
29+
--rm \
30+
-it \
31+
-p 8501:8501 \
32+
-v `pwd`:/srv \
33+
-e SHELL=/bin/bash \
34+
streamlit-webrtc \
35+
poetry shell

0 commit comments

Comments
 (0)