Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devcontainer / Codespace 추가 #665

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 3 additions & 6 deletions requirements-noplot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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