TillCyrill
commited on
Commit
•
2344d73
1
Parent(s):
e95bb5a
user permissions
Browse files- Dockerfile +13 -2
- main.py +1 -1
Dockerfile
CHANGED
@@ -16,11 +16,22 @@ USER root
|
|
16 |
#
|
17 |
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
WORKDIR $HOME/app
|
20 |
|
21 |
|
22 |
-
RUN mkdir -p /data
|
23 |
-
RUN chmod 777 /data
|
24 |
#RUN useradd -m -u 1000 user
|
25 |
#USER user
|
26 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
|
|
16 |
#
|
17 |
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
18 |
|
19 |
+
# Set up a new user named "user" with user ID 1000
|
20 |
+
RUN useradd -m -u 1000 user
|
21 |
+
|
22 |
+
# Switch to the "user" user
|
23 |
+
USER user
|
24 |
+
|
25 |
+
# Set home to the user's home directory
|
26 |
+
ENV HOME=/home/user \
|
27 |
+
PATH=/home/user/.local/bin:$PATH
|
28 |
+
|
29 |
+
|
30 |
WORKDIR $HOME/app
|
31 |
|
32 |
|
33 |
+
#RUN mkdir -p /data
|
34 |
+
#RUN chmod 777 /data
|
35 |
#RUN useradd -m -u 1000 user
|
36 |
#USER user
|
37 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
main.py
CHANGED
@@ -61,7 +61,7 @@ def run_leap(fileName, path):
|
|
61 |
os.system("tleap -f "+path+"leap.in >> "+path+"leap.out")
|
62 |
|
63 |
def convert_to_amber_format(pdbName):
|
64 |
-
fileName, path = pdbName+'.pdb', '
|
65 |
os.system("pdb4amber -i "+fileName+" -p -y -o "+path+"4amb.pdb -l "+path+"pdb4amber_protein.log")
|
66 |
run_leap(fileName, path)
|
67 |
traj = pt.iterload(path+'exp.crd', top = path+'exp.top')
|
|
|
61 |
os.system("tleap -f "+path+"leap.in >> "+path+"leap.out")
|
62 |
|
63 |
def convert_to_amber_format(pdbName):
|
64 |
+
fileName, path = pdbName+'.pdb', './'
|
65 |
os.system("pdb4amber -i "+fileName+" -p -y -o "+path+"4amb.pdb -l "+path+"pdb4amber_protein.log")
|
66 |
run_leap(fileName, path)
|
67 |
traj = pt.iterload(path+'exp.crd', top = path+'exp.top')
|