Skip to content

Instantly share code, notes, and snippets.

@klesouza
Last active February 15, 2021 15:34
Show Gist options
  • Save klesouza/c9ce9d2a58ae834d656bd8b85ef82e73 to your computer and use it in GitHub Desktop.
Save klesouza/c9ce9d2a58ae834d656bd8b85ef82e73 to your computer and use it in GitHub Desktop.
VS Code devcontainer for pyspark
version: '3'
services:
spark:
image: jupyter/pyspark-notebook
volumes:
- .:/home/jovyan/code
ports:
- "8888:8888"
environment:
PYTHONPATH: "/usr/local/spark/python/lib/py4j-0.10.9-src.zip:/usr/local/spark/python:"
{
"name": "Python 3",
"dockerComposeFile": ["../docker-compose.yaml"],
"service": "spark",
"workspaceFolder": "/home/jovyan/code",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment