Skip to content

Commit

Permalink
✨ feat:
Browse files Browse the repository at this point in the history
update dev and vscode files
  • Loading branch information
liunaiyuan committed Aug 2, 2023
1 parent 454e725 commit 3c81f54
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "vits",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Docker/dockerfile",
"target": "development"
},
"runArgs": [
"--gpus",
"all",
"--shm-size=16g"
],
"mounts": [
"source=${localEnv:HOME}/gddi-nas,target=/gddi-nas,type=bind,consistency=cached",
"source=${localEnv:HOME}/ml-data,target=/ml-data,type=bind,consistency=cached",
"source=${localEnv:HOME}/.ssh,target=/home/myuser/.ssh,type=bind,consistency=cached",
"source=${localEnv:HOME}/.vscode-server,target=/home/myuser/.vscode-server,type=bind,consistency=cached",
],
}
3 changes: 3 additions & 0 deletions .devcontainer/noop.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This file copied into the container along with environment.yml* from the parent
folder. This file is included to prevents the Dockerfile COPY instruction from
failing if no environment.yml is found.
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "train",
"type": "python",
"request": "launch",
"program": "tools/train_plateform.py",
"console": "integratedTerminal",
"args": [
"configs/textrecog/plate/plateform_training_testing.py","--seed", "0",
"--work-dir=output/plateform_training_testing",
"--load-from=pretrained_weight/general_ocr.pth",
],
"justMyCode": true,
"sudo": true
},
]
}
5 changes: 5 additions & 0 deletions Docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ RUN apt-get update && apt-get install -y libglib2.0-0 libgl1-mesa-glx sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY . /vits
WORKDIR /vits

RUN pip install -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple
RUN rm -rf /vits

# Development image
FROM base as development
Expand Down

0 comments on commit 3c81f54

Please sign in to comment.