diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..8b72dbce6 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/vscode/devcontainers/python:3.9 + +COPY ../requirements-noplot.txt /tmp/pip-tmp/requirements.txt + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get install git gcc unzip make -y \ + && pip3 install --disable-pip-version-check --no-cache-dir -r /tmp/pip-tmp/requirements.txt \ + && rm -rf /tmp/pip-tmp diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..cfc9f5612 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,47 @@ +{ + // devcontainer name + "name": "PyTorchKorea-tutorials-kr", + + // Container build settings + "build": { + "context": "..", + "dockerfile": "Dockerfile", + "args": {} + }, + + // Ports to open + "forwardPorts": [ + // Python built-in web server + 8000 + ], + + // VSCode settings + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "workbench.startupEditor": "none", + "files.autoSave": "afterDelay", + "python.dataScience.enabled": true, + "python.dataScience.alwaysTrustNotebooks": true, + "python.insidersChannel": "weekly", + "python.showStartPage": false + }, + + // VSCode extensions to install + "extensions": [ + "ms-python.python", + "streetsidesoftware.code-spell-checker", + + // reStructuredText + "lextudio.restructuredtext", + + // Markdown + "bierner.github-markdown-preview", + "DavidAnson.vscode-markdownlint", + "docsmsft.docs-linting", + "johnpapa.read-time", + "yzhang.markdown-all-in-one", + ], + + // User, more info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} diff --git a/Makefile b/Makefile index 122ce4365..f6b8b9a41 100644 --- a/Makefile +++ b/Makefile @@ -128,6 +128,22 @@ html-noplot: @echo @echo "HTML-ONLY build finished. The HTML pages are in $(BUILDDIR)/html." +serve: + @echo "---------------------------------------------------------------------------------" + @echo "* Open your browser and visit http://localhost:8000/ *" + @echo "* If you're using Codespace, click on the 'Ports' tab and then 'Open Browser' *" + @echo "* or try https://$(CODESPACE_NAME)-8000.preview.app.github.dev/ *" + @echo "---------------------------------------------------------------------------------" + cd $(BUILDDIR)/html && python -m http.server + +serve-docs: + make docs + make serve + +serve-noplot: + make html-noplot + make serve + clean-cache: make clean rm -rf advanced beginner intermediate recipes diff --git a/requirements-noplot.txt b/requirements-noplot.txt index 9d5ed93d3..d47c25342 100644 --- a/requirements-noplot.txt +++ b/requirements-noplot.txt @@ -10,14 +10,11 @@ sphinx-sitemap==2.2.0 sphinxext-opengraph==0.6.3 sphinxcontrib-katex==0.8.6 jinja2==3.0.3 -plotly==5.14.0 +bs4 +pillow==9.3.0 +plotly==5.14.0 torch -torchvision -torchtext -torchaudio -torchdata -networkx # PyTorch Korea Theme pytorch-sphinx-theme@https://github.com/PyTorchKorea/pytorch_sphinx_theme/archive/master.zip