Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01198d5

Browse files
Add Docker file Config and more setting for Packages.
1 parent d573ad5 commit 01198d5

File tree

6 files changed

+153
-0
lines changed

6 files changed

+153
-0
lines changed

‎.dockerignore‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Python
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
*.so
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# Virtual Environment
28+
.env
29+
.venv
30+
env/
31+
venv/
32+
ENV/
33+
34+
# IDE
35+
.idea/
36+
.vscode/
37+
*.swp
38+
*.swo
39+
40+
# Tests
41+
.coverage
42+
.pytest_cache/
43+
htmlcov/
44+
45+
# Docs
46+
docs/_build/

‎.vscode/extensions.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"ms-python.vscode-pylance",
5+
"ms-python.black-formatter",
6+
"charliermarsh.ruff",
7+
"ms-toolsai.jupyter",
8+
"njpwerner.autodocstring",
9+
"tamasfe.even-better-toml",
10+
"streetsidesoftware.code-spell-checker"
11+
]
12+
}

‎.vscode/launch.json‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python: Current File",
6+
"type": "python",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"justMyCode": false
11+
},
12+
{
13+
"name": "Python: Run Tests",
14+
"type": "python",
15+
"request": "launch",
16+
"module": "pytest",
17+
"args": [
18+
"tests/",
19+
"-v"
20+
],
21+
"console": "integratedTerminal",
22+
"justMyCode": false
23+
},
24+
{
25+
"name": "Python: Build Docs",
26+
"type": "python",
27+
"request": "launch",
28+
"cwd": "${workspaceFolder}/docs",
29+
"module": "sphinx",
30+
"args": [
31+
"-b",
32+
"html",
33+
".",
34+
"_build/html"
35+
],
36+
"console": "integratedTerminal"
37+
}
38+
]
39+
}

‎.vscode/settings.json‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"python.testing.pytestEnabled": true,
3+
"python.testing.unittestEnabled": false,
4+
"python.testing.nosetestsEnabled": false,
5+
"python.testing.pytestArgs": [
6+
"tests"
7+
],
8+
"python.formatting.provider": "black",
9+
"editor.formatOnSave": true,
10+
"editor.codeActionsOnSave": {
11+
"source.organizeImports": true
12+
},
13+
"python.linting.enabled": true,
14+
"python.linting.ruffEnabled": true,
15+
"python.analysis.typeCheckingMode": "basic",
16+
"[python]": {
17+
"editor.defaultFormatter": "ms-python.black-formatter",
18+
"editor.formatOnSave": true,
19+
"editor.codeActionsOnSave": {
20+
"source.organizeImports": true
21+
}
22+
}
23+
}

‎Dockerfile‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.10-slim
2+
3+
WORKDIR /app
4+
5+
# Install system dependencies
6+
RUN apt-get update && apt-get install -y \
7+
build-essential \
8+
git \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Copy package files
12+
COPY . .
13+
14+
# Install package
15+
RUN pip install --no-cache-dir -e ".[dev,docs]"
16+
17+
# Default command
18+
CMD ["bash"]

‎docker-compose.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3'
2+
services:
3+
diffusionlm:
4+
build: .
5+
volumes:
6+
- .:/app
7+
environment:
8+
- PYTHONPATH=/app
9+
deploy:
10+
resources:
11+
reservations:
12+
devices:
13+
- driver: nvidia
14+
count: all
15+
capabilities: [ gpu ]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /