Skip to content

Commit e8faa08

Browse files
committed
bugfix for sys.path
1 parent 17237c1 commit e8faa08

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.git/
2+
.gitignore
3+
.gitattributes
4+
Dockerfile
5+
.dockerignore
6+
7+
.vscode/
8+
.idea/
9+
.mypy_cache
10+
11+
*.md
12+
doc/
13+
rel/
14+
logs/
15+
16+
notebook/
17+
.ipynb_checkpoints/
18+
*.py[cod]
19+
__pycache__
20+
*.c
21+
22+
*.lock

src/aloha/script/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55

66
def main():
7+
if '' not in sys.path: # if start from script, cwd is not include in sys.path
8+
sys.path.insert(0, '')
9+
710
parser = argparse.ArgumentParser()
811
parser.add_argument('cmd')
912
args, _ = parser.parse_known_args()

tool/app.Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ ENV PORT_SVC=${PORT_SVC:-80} \
3838

3939
RUN set -ex && pwd && ls -al && sh ./run_config.sh \
4040
&& pip install -U --no-cache-dir pip \
41-
&& ( [ -f ./requirements.txt ] && pip install -U --no-cache-dir -r ./requirements.txt ) \
42-
&& pip list \
41+
&& ( [ -f ./requirements.txt ] && pip install -U --no-cache-dir -r ./requirements.txt || true ) && pip list \
4342
&& rm -rf ~/.cache && ls -al && printenv | sort
4443

4544
VOLUME ${DIR_APP}/logs

0 commit comments

Comments
 (0)