Skip to content

Commit b4e8c95

Browse files
authored
Merge pull request #2 from eywalker/main
Add dev container setup
2 parents 2d2bf66 + 87dfcb3 commit b4e8c95

File tree

7 files changed

+229
-14
lines changed

7 files changed

+229
-14
lines changed

.devcontainer/devcontainer.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3+
{
4+
"name": "Docker compose dev",
5+
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
6+
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
7+
"dockerComposeFile": [
8+
"../docker-compose.yml",
9+
"docker-compose.yml"
10+
],
11+
// The 'service' property is the name of the service for the container that VS Code should
12+
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
13+
"service": "notebook",
14+
// The optional 'workspaceFolder' property is the path VS Code should open by default when
15+
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
16+
"workspaceFolder": "/src",
17+
// Features to add to the dev container. More info: https://containers.dev/features.
18+
// "features": {},
19+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
20+
// "forwardPorts": [],
21+
// Uncomment the next line if you want start specific services in your Docker Compose config.
22+
// "runServices": [],
23+
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
24+
// "shutdownAction": "none",
25+
// Uncomment the next line to run commands after the container is created.
26+
// "postCreateCommand": "cat /etc/os-release",
27+
// Configure tool-specific properties.
28+
// "customizations": {},
29+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
30+
// "remoteUser": "devcontainer"
31+
}

.devcontainer/docker-compose.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3'
2+
services:
3+
# Update this to the name of the service you want to work with in your docker-compose.yml file
4+
notebook:
5+
# Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
6+
# folder. Note that the path of the Dockerfile and context is relative to the *primary*
7+
# docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
8+
# array). The sample below assumes your primary file is in the root of your project.
9+
#
10+
# build:
11+
# context: .
12+
13+
# dockerfile: .devcontainer/Dockerfile
14+
15+
volumes:
16+
# Update this to wherever you want VS Code to mount the folder of your project
17+
- .:/src/project
18+
# Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
19+
# cap_add:
20+
# - SYS_PTRACE
21+
# security_opt:
22+
# - seccomp:unconfined
23+
24+
# Overrides default command so things don't shut down after the process ends.
25+
command: /bin/sh -c "while sleep 1000; do :; done"

.gitignore

+167
Original file line numberDiff line numberDiff line change
@@ -1 +1,168 @@
1+
# Mac files
2+
.DS_Stores
3+
4+
# temp files
5+
~*
6+
*~
7+
8+
# computed
9+
computed/
10+
11+
# just for testing
12+
rough/
13+
14+
# image models
15+
trained_models
16+
17+
# wandb
18+
wandb/
19+
artifacts/
20+
21+
# pytorch and pickle files
22+
*.pt
23+
*.pickle
24+
25+
# custom temp files
26+
temp/
27+
28+
# matlab data files
29+
*.mat
30+
31+
# ignore singularity images
32+
*.sif
33+
34+
# vscode specifics
35+
.vscode/
36+
37+
# data
38+
data/
39+
40+
# Byte-compiled / optimized / DLL files
41+
__pycache__/
42+
*.py[cod]
43+
*$py.class
44+
45+
# C extensions
46+
*.so
47+
48+
# Distribution / packaging
49+
.Python
50+
build/
51+
develop-eggs/
52+
dist/
53+
downloads/
54+
eggs/
55+
.eggs/
56+
lib/
57+
lib64/
58+
parts/
59+
sdist/
60+
var/
61+
wheels/
62+
pip-wheel-metadata/
63+
share/python-wheels/
64+
*.egg-info/
65+
.installed.cfg
66+
*.egg
67+
MANIFEST
68+
69+
# PyInstaller
70+
# Usually these files are written by a python script from a template
71+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
72+
*.manifest
73+
*.spec
74+
75+
# Installer logs
76+
pip-log.txt
77+
pip-delete-this-directory.txt
78+
79+
# Unit test / coverage reports
80+
htmlcov/
81+
.tox/
82+
.nox/
83+
.coverage
84+
.coverage.*
85+
.cache
86+
nosetests.xml
87+
coverage.xml
88+
*.cover
89+
*.py,cover
90+
.hypothesis/
91+
.pytest_cache/
92+
93+
# Translations
94+
*.mo
95+
*.pot
96+
97+
# Django stuff:
98+
*.log
99+
local_settings.py
100+
db.sqlite3
101+
db.sqlite3-journal
102+
103+
# Flask stuff:
104+
instance/
105+
.webassets-cache
106+
107+
# Scrapy stuff:
108+
.scrapy
109+
110+
# Sphinx documentation
111+
docs/_build/
112+
113+
# PyBuilder
114+
target/
115+
116+
# Jupyter Notebook
117+
.ipynb_checkpoints
118+
119+
# IPython
120+
profile_default/
121+
ipython_config.py
122+
123+
# pyenv
124+
.python-version
125+
126+
# pipenv
127+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
128+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
129+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
130+
# install all needed dependencies.
131+
#Pipfile.lock
132+
133+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
134+
__pypackages__/
135+
136+
# Celery stuff
137+
celerybeat-schedule
138+
celerybeat.pid
139+
140+
# SageMath parsed files
141+
*.sage.py
142+
143+
# Environments
1144
.env
145+
.venv
146+
env/
147+
venv/
148+
ENV/
149+
env.bak/
150+
venv.bak/
151+
152+
# Spyder project settings
153+
.spyderproject
154+
.spyproject
155+
156+
# Rope project settings
157+
.ropeproject
158+
159+
# mkdocs documentation
160+
/site
161+
162+
# mypy
163+
.mypy_cache/
164+
.dmypy.json
165+
dmypy.json
166+
167+
# Pyre type checker
168+
.pyre/

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# FROM walkerlab/pytorch:python3.8-torch1.11.0-cuda11.2.1
2-
FROM walkerlab/pytorch-jupyter:cuda-11.3.1-pytorch-1.12.0-torchvision-0.12.0-torchaudio-0.11.0-ubuntu-20.04
1+
FROM ghcr.io/walkerlab/pytorch-jupyter:cuda-11.8.0-pytorch-1.13.0-torchvision-0.14.0-torchaudio-0.13.0-ubuntu-22.04
32

43
RUN git clone https://github.com/learning-2-learn/lfp_tools /src/lfp_tools &&\
54
pip3 install -e /src/lfp_tools

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# wcst_encode
1+
# wcst_encode

docker-compose.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ services:
33
notebook:
44
build: .
55
ports:
6-
- "${JUPYTER_IP:-127.0.0.1}:${JUPYTER_PORT:-8888}:8888"
6+
- "${JUPYTER_IP:-127.0.0.1}:${JUPYTER_PORT:-8888}:8888"
77
environment:
88
- "JUPYTER_PASSWORD=${JUPYTER_PASSWORD:-simple}"
9-
runtime: nvidia
109
volumes:
1110
- .:/src/wcst_encode
1211
- $HOME/.aws/credentials:/root/.aws/credentials:ro
1312
- $HOME/.ssh/id_rsa:/root/.ssh/id_rsa
1413
- /mnt/U19_NAS/hackathon:/data
15-

setup.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
#!/usr/bin/env python
22
from setuptools import setup, find_packages
3-
from os import path
4-
5-
here = path.abspath(path.dirname(__file__))
63

74
setup(
8-
name='wcst_encode',
9-
version='0.0.0',
5+
name="wcst_encode",
6+
version="0.0.0",
107
description='Tools and analysis for encoding behavioral/experimental variables from neural data',
11-
author='Patrick Zhang',
12-
author_email='[email protected]',
13-
packages=find_packages(exclude=[]),
8+
packages=find_packages(),
149
)

0 commit comments

Comments
 (0)