bryan-stearns commited on
Commit
2b7acff
1 Parent(s): cb128a1

Attempting to fix permissions issue

Browse files
.gitattributes CHANGED
File without changes
Dockerfile CHANGED
@@ -1,18 +1,34 @@
1
  FROM python:3.10-slim-buster
2
 
3
- WORKDIR /app
 
 
 
 
 
 
 
4
 
 
 
 
 
 
 
 
5
  COPY requirements.txt requirements.txt
6
  RUN pip3 install -r requirements.txt
7
 
8
- ENV SOAR_HOME="/app/soar-bin_debian-buster"
9
  ENV PYTHONPATH="${SOAR_HOME}:${PYTHONPATH}"
10
  ENV DYLD_LIBRARY_PATH="${SOAR_HOME}:${DYLD_LIBRARY_PATH}"
11
 
12
  COPY . .
13
 
14
- RUN chmod 777 /app/*
15
- # RUN chmod 777 /app/data/*
 
 
16
 
17
  EXPOSE 7860 7860
18
 
 
1
  FROM python:3.10-slim-buster
2
 
3
+ ### Set up user with permissions
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
+ # Switch to the "user" user
7
+ USER user
8
+ # Set home to the user's home directory
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
 
12
+ # Set the working directory to the user's home directory
13
+ WORKDIR $HOME/app
14
+
15
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
16
+ COPY --chown=user . $HOME/app
17
+
18
+ ### Finish up with app-specific content
19
  COPY requirements.txt requirements.txt
20
  RUN pip3 install -r requirements.txt
21
 
22
+ ENV SOAR_HOME="${HOME}/app/soar-bin_debian-buster"
23
  ENV PYTHONPATH="${SOAR_HOME}:${PYTHONPATH}"
24
  ENV DYLD_LIBRARY_PATH="${SOAR_HOME}:${DYLD_LIBRARY_PATH}"
25
 
26
  COPY . .
27
 
28
+ USER root
29
+ RUN chmod 777 ~/app/*
30
+ # RUN chmod 777 ~app/data/*
31
+ USER user
32
 
33
  EXPOSE 7860 7860
34
 
README.md CHANGED
File without changes
gradio_app.py CHANGED
File without changes
pysoarlib/AgentConnector.py CHANGED
File without changes
pysoarlib/IdentifierExtensions.py CHANGED
File without changes
pysoarlib/LICENSE CHANGED
File without changes
pysoarlib/README.md CHANGED
File without changes
pysoarlib/SVSCommands.py CHANGED
File without changes
pysoarlib/SoarClient.py CHANGED
File without changes
pysoarlib/SoarWME.py CHANGED
File without changes
pysoarlib/TimeConnector.py CHANGED
File without changes
pysoarlib/WMInterface.py CHANGED
File without changes
pysoarlib/__init__.py CHANGED
File without changes
pysoarlib/__pycache__/__init__.cpython-310.pyc CHANGED
File without changes
pysoarlib/util/PrintoutIdentifier.py CHANGED
File without changes
pysoarlib/util/WMNode.py CHANGED
File without changes
pysoarlib/util/__init__.py CHANGED
File without changes
pysoarlib/util/extract_wm_graph.py CHANGED
File without changes
pysoarlib/util/parse_wm_printout.py CHANGED
File without changes
pysoarlib/util/remove_tree_from_wm.py CHANGED
File without changes
pysoarlib/util/update_wm_from_tree.py CHANGED
File without changes
requirements.txt CHANGED
File without changes
soar-bin_debian-buster/Python_sml_ClientInterface.py CHANGED
File without changes
soar-bin_debian-buster/SoarJavaDebugger.jar CHANGED
File without changes
soar-bin_debian-buster/java/sml.jar CHANGED
File without changes
soar-bin_debian-buster/java/soar-debugger-api.jar CHANGED
File without changes
soar-bin_debian-buster/java/soar-debugger.jar CHANGED
File without changes
soar-bin_debian-buster/java/soar-smljava.jar CHANGED
File without changes
soar_io.py CHANGED
File without changes