-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor dockefiles and add jupyter notebook (#3)
* change base images of mediasoup_sfu and webrtc_app * fix tslint errors in webrtc_app * add jupyter notebook docker container to the stack * add some data checks at the end of the cells in notebooks (thanks Chad for the suggestion!)
- Loading branch information
1 parent
064445f
commit db9a04e
Showing
14 changed files
with
365 additions
and
265 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,23 @@ | ||
FROM ubuntu:20.04 | ||
# FROM sitespeedio/node:ubuntu-20.04-nodejs-16.13.2 | ||
FROM node:latest | ||
|
||
USER root | ||
|
||
ENV TZ=Europe/Helsinki | ||
|
||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
RUN apt-get update && apt-get -y --no-install-recommends install \ | ||
sudo \ | ||
vim \ | ||
wget \ | ||
build-essential \ | ||
pkg-config \ | ||
gdb | ||
|
||
RUN echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list && \ | ||
echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list && \ | ||
echo "deb-src http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list | ||
|
||
|
||
RUN apt-get install -y curl && \ | ||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && \ | ||
sudo dpkg --configure -a && \ | ||
printf 'y\n1\n\1n' | apt upgrade | ||
|
||
|
||
RUN apt-get install -y aptitude && \ | ||
aptitude install -y nodejs && \ | ||
aptitude install -y npm && \ | ||
apt install -y python3-pip | ||
|
||
WORKDIR /app | ||
|
||
COPY [ \ | ||
"package.json", \ | ||
"tsconfig.json", \ | ||
"src/*", \ | ||
"*.js", \ | ||
"./" \ | ||
] | ||
COPY package.json ./ | ||
|
||
COPY ./ ./ | ||
|
||
# RUN apk add --no-cache git make bash python3 py3-pip net-tools gcc alpine-sdk iproute2 linux-headers | ||
RUN apt-get update && apt-get install -y build-essential python3 python3-pip iproute2 net-tools make | ||
RUN npm install | ||
RUN npm install typescript -g | ||
RUN tsc | ||
|
||
# for throttling traffic | ||
RUN apt-get install -y net-tools iproute2 | ||
# RUN apt-get install -y net-tools iproute2 | ||
|
||
# ENV DEBUG="mediasoup*" | ||
CMD [ "node", "dist/main.js" ] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM jupyter/base-notebook | ||
|
||
USER root | ||
|
||
# Add requirements file | ||
ADD requirements.txt /app/ | ||
|
||
# Installs, clean, and update | ||
RUN apt-get update \ | ||
&& apt-get clean \ | ||
&& apt-get update -qqq \ | ||
&& apt-get install -y -q g++ \ | ||
&& pip install --upgrade pip \ | ||
&& pip install -r /app/requirements.txt | ||
|
||
ENV JUPYTER_ENABLE_LAB=yes | ||
|
||
CMD jupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token='' --NotebookApp.password='' | ||
|
||
EXPOSE 8888 |
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
Oops, something went wrong.