[~] Refactor

This commit is contained in:
Siarhei Siniak 2024-07-06 12:02:05 +03:00
parent a317081fd3
commit 2f5a5d0e78
3 changed files with 26 additions and 2 deletions

@ -5,4 +5,5 @@ RUN apt-get update -yy && apt-get install -yy zsh htop mc git
WORKDIR /app
CMD ["bash", "docker/tiktok/entry.sh"]
ENTRYPOINT ["bash", "docker/tiktok/entry.sh"]
CMD ["zsh", "-l"]

23
docker/tiktok/Makefile Normal file

@ -0,0 +1,23 @@
PROJECT_ROOT := ${PWD}
PORT ?= 8888
TOKEN ?= $(shell pwgen -n 20 1)
run:
cd ${PROJECT_ROOT} && \
sudo docker-compose \
-f docker/tiktok/docker-compose.yml \
run \
--rm tiktok
jupyter:
cd ${PROJECT_ROOT} && \
sudo docker-compose \
-f docker/tiktok/docker-compose.yml \
run \
-p 127.0.0.1:${PORT}:8888 \
--rm tiktok \
jupyter-lab \
--allow-root \
--ip=0.0.0.0 \
--NotebookApp.token=${TOKEN}

@ -5,4 +5,4 @@ mkdir -p tmp/cache/tiktok/jupyter
ln -sf $PWD/tmp/cache/tiktok/zsh/histfile ~/.histfile
ln -sf $PWD/tmp/cache/tiktok/jupyter ~/.jupyter
ln -sf $PWD/tmp/cache/tiktok/ipython ~/.ipython
exec zsh -l
exec $@