lkjjj26 commited on
Commit
b89b36a
·
1 Parent(s): 19c5d29

dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -2
  2. app.py +1 -1
Dockerfile CHANGED
@@ -6,8 +6,19 @@ COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
10
 
11
- EXPOSE 7860
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
+ RUN useradd -m -u 1000 user
10
 
11
+ USER user
12
+
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ WORKDIR $HOME/app
17
+
18
+ COPY --chown=user . $HOME/app
19
+
20
+ # COPY . .
21
+
22
+ # EXPOSE 7860
23
 
24
  CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
app.py CHANGED
@@ -377,7 +377,7 @@ def server(input, output, session):
377
  df = pd.DataFrame(results)
378
  if not df.empty:
379
  df['PDB ID'] = df['PDB ID'].apply(
380
- lambda x: f'<a href="https://www.rcsb.org/3d-view/{x}" target="_blank">{x}</a>'
381
  )
382
 
383
  @output
 
377
  df = pd.DataFrame(results)
378
  if not df.empty:
379
  df['PDB ID'] = df['PDB ID'].apply(
380
+ lambda x: f'<a href="https://www.rcsb.org/3d-view/{x}" target="_blank">{pdbsummary(x)}</a>'
381
  )
382
 
383
  @output