-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hypergraphs
- Loading branch information
Showing
10 changed files
with
285 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
/data_validation/ | ||
.DS_Store | ||
/venv/ | ||
/.idea/ | ||
/.git/ | ||
/docker-compose.yml | ||
*.ipynb_checkpoints | ||
__pycache__ | ||
/cache/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
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,50 @@ | ||
FROM nvidia/cuda:11.6.2-devel-ubuntu20.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
WORKDIR /app | ||
|
||
# Install required packages | ||
RUN set -xe \ | ||
&& apt-get -y update \ | ||
&& apt-get install -fyqq software-properties-common curl build-essential git libaio-dev llvm-10 clang wget \ | ||
&& apt-get -y update \ | ||
&& add-apt-repository universe \ | ||
&& apt-get -y update \ | ||
&& apt-get -fyqq install python3.9-full python3.9-dev python3-pip \ | ||
&& apt-get clean | ||
|
||
# Let's upgrade pip first | ||
RUN set -xe \ | ||
&& python3.9 -m pip install --upgrade pip | ||
|
||
# Install python packages | ||
RUN set -xe \ | ||
# PyTorch MUST BE installed first | ||
&& python3.9 -m pip install \ | ||
'torch==1.12.1+cu116' \ | ||
-f https://download.pytorch.org/whl/torch_stable.html \ | ||
# And only then all other dependencies | ||
&& python3.9 -m pip install \ | ||
'torch-geometric==2.0.4' \ | ||
'torch-sparse==0.6.15+pt112cu116' \ | ||
'torch-scatter==2.1.0+pt112cu116' \ | ||
-f https://data.pyg.org/whl/torch-1.12.1+cu116.html | ||
|
||
# Install Jupyter | ||
EXPOSE 8080 | ||
RUN set -xe \ | ||
&& python3.9 -m pip install jupyter \ | ||
&& jupyter notebook --generate-config \ | ||
&& echo "c.ServerApp.allow_origin = '*'" >> /root/.jupyter/jupyter_notebook_config.py \ | ||
&& echo "c.ServerApp.allow_remote_access = True" >> /root/.jupyter/jupyter_notebook_config.py \ | ||
# passwd('admin','sha1') | ||
&& echo "c.NotebookApp.password = u'sha1:fd40b23609dd:882af6cdf722657245be6f4abd9b641a84ef9c2a'" >> /root/.jupyter/jupyter_notebook_config.py | ||
|
||
# Install requirements | ||
COPY requirements.txt ./ | ||
RUN set -xe \ | ||
&& python3.9 -m pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy project files | ||
COPY . . | ||
|
||
ENTRYPOINT ["/app/entrypoint.sh"] |
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,53 @@ | ||
# Docker Devbox | ||
|
||
Requirements: | ||
|
||
* Docker | ||
* Docker Compose | ||
* Docker Nvidia Runtime | ||
|
||
## How to run | ||
|
||
Copy docker-compose from example: | ||
|
||
```shell | ||
cp docker-compose.dist.yml docker-compose.yml | ||
``` | ||
|
||
Build an image: | ||
|
||
```shell | ||
docker-compose build | ||
``` | ||
|
||
Start a container: | ||
|
||
```shell | ||
docker-compose up -d | ||
``` | ||
|
||
## How to use inside a container | ||
|
||
Login into a container: | ||
|
||
```shell | ||
docker-compose exec app bash | ||
``` | ||
|
||
Use python3.9 interpreter for running all your tasks, e.g. tutorials: | ||
|
||
```shell | ||
# Prepare environment | ||
cd tutorials | ||
ln -s ../stable_gnn | ||
|
||
# Run graph classification task | ||
python3.9 graph_classification.py | ||
|
||
# Run node classification task | ||
python3.9 node_classification.py | ||
``` | ||
|
||
## How to use from IDE like PyCharm | ||
|
||
You need to `Add New Interpreter` via menu of PyCharn, then select `Docker Compose` |
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,19 @@ | ||
version: "3.9" | ||
|
||
services: | ||
|
||
app: | ||
restart: "unless-stopped" | ||
build: | ||
context: . | ||
volumes: | ||
- ./:/app | ||
ports: | ||
- "127.0.0.1:8888:8888" | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 1 | ||
capabilities: [ gpu ] |
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,8 @@ | ||
#!/bin/bash | ||
|
||
JN_PORT=${PORT:-8888} | ||
if [ -z "$JN_IP" ]; then | ||
JN_IP=$(hostname -I | awk '{print $1}') | ||
fi | ||
|
||
jupyter notebook --allow-root --ip="$JN_IP" --port="$JN_PORT" --no-browser |
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,4 +1,4 @@ | ||
bamt | ||
optuna | ||
pgmpy | ||
pandas | ||
bamt==1.1.44 | ||
optuna==2.10.1 | ||
pgmpy==0.1.20 | ||
pandas==1.5.2 |
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