HoneyTian commited on
Commit
8cfd8f4
1 Parent(s): d03c698
Files changed (2) hide show
  1. Dockerfile +11 -3
  2. project_settings.py +1 -1
Dockerfile CHANGED
@@ -11,7 +11,15 @@ RUN pip install --upgrade pip
11
 
12
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
- # libk2_torch_api.so
15
- RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.8/site-packages/k2/lib/
16
 
17
- CMD ["python", "main.py"]
 
 
 
 
 
 
 
 
 
 
11
 
12
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
+ RUN useradd -m -u 1000 user
 
15
 
16
+ USER user
17
+
18
+ ENV HOME=/home/user \
19
+ PATH=/home/user/.local/bin:$PATH
20
+
21
+ WORKDIR $HOME/app
22
+
23
+ COPY --chown=user . $HOME/app
24
+
25
+ CMD ["python3", "main.py"]
project_settings.py CHANGED
@@ -7,7 +7,7 @@ from pathlib import Path
7
  project_path = os.path.abspath(os.path.dirname(__file__))
8
  project_path = Path(project_path)
9
 
10
- log_directory = project_path / "log"
11
  log_directory.mkdir(parents=True, exist_ok=True)
12
 
13
  temp_directory = project_path / "temp"
 
7
  project_path = os.path.abspath(os.path.dirname(__file__))
8
  project_path = Path(project_path)
9
 
10
+ log_directory = project_path / "logs"
11
  log_directory.mkdir(parents=True, exist_ok=True)
12
 
13
  temp_directory = project_path / "temp"