yaziciz commited on
Commit
f0a28fa
·
verified ·
1 Parent(s): de9d813

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -1,27 +1,28 @@
1
  FROM yaziciz/deepsurg_vllm_v1
2
 
3
- # Install system dependency required for OpenCV.
4
- RUN apt-get update && apt-get install -y libgl1-mesa-glx
5
-
6
  RUN useradd -m -u 1000 user
7
 
 
8
  USER user
9
 
 
10
  ENV HOME=/home/user \
11
- PATH=/home/user/.local/bin:$PATH
12
 
 
13
  WORKDIR $HOME/app
14
 
15
- # Explicitly copy the environment file first.
16
- COPY --chown=user environment.yml $HOME/app/environment.yml
17
- # Then copy the rest of the application files.
18
- COPY --chown=user . $HOME/app/
19
 
20
- # (Optional) Debug: List files in $HOME/app to verify environment.yml is present.
21
- RUN ls -la $HOME/app
22
 
23
  # Create the conda environment using the absolute path to the environment file.
24
- RUN conda env create -f $HOME/app/environment.yml
 
 
 
25
 
26
  # Run demo.py using the 'ssgqa' conda environment.
27
  CMD ["conda", "run", "--no-capture-output", "-n", "ssgqa", "python", "demo.py"]
 
1
  FROM yaziciz/deepsurg_vllm_v1
2
 
 
 
 
3
  RUN useradd -m -u 1000 user
4
 
5
+ # Switch to the "user" user
6
  USER user
7
 
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
+ # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
16
+ RUN pip install --no-cache-dir --upgrade pip
 
 
17
 
18
+ # Install system dependency required for OpenCV.
19
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx
20
 
21
  # Create the conda environment using the absolute path to the environment file.
22
+ RUN conda env create -f environment.yml
23
+
24
+ # (Optional) Debug: List files in $HOME/app to verify environment.yml is present.
25
+ RUN ls -la /
26
 
27
  # Run demo.py using the 'ssgqa' conda environment.
28
  CMD ["conda", "run", "--no-capture-output", "-n", "ssgqa", "python", "demo.py"]