Update Dockerfile
Browse files- Dockerfile +15 -10
Dockerfile
CHANGED
@@ -1,27 +1,32 @@
|
|
1 |
FROM yaziciz/deepsurg_vllm_v1
|
2 |
|
|
|
3 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
4 |
|
|
|
5 |
RUN useradd -m -u 1000 user
|
6 |
|
7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
8 |
USER user
|
9 |
|
10 |
-
# Set home to the user's home directory
|
11 |
ENV HOME=/home/user \
|
12 |
-
|
13 |
|
14 |
-
# Set the working directory to the user's home directory
|
15 |
WORKDIR $HOME/app
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
|
20 |
-
#
|
21 |
-
RUN
|
22 |
|
23 |
-
#
|
24 |
-
RUN
|
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 |
+
# Install system dependency required for OpenCV.
|
4 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
5 |
|
6 |
+
# Create a new user.
|
7 |
RUN useradd -m -u 1000 user
|
8 |
|
9 |
+
# Create the destination directory, move all files from /app (from the base image) to /home/user/app, and update ownership recursively.
|
10 |
+
RUN mkdir -p /home/user/app && \
|
11 |
+
cp -r /app/* /home/user/app/ && \
|
12 |
+
chown -R user:user /home/user/app
|
13 |
+
|
14 |
+
# Switch to the non-root user.
|
15 |
USER user
|
16 |
|
|
|
17 |
ENV HOME=/home/user \
|
18 |
+
PATH=/home/user/.local/bin:$PATH
|
19 |
|
|
|
20 |
WORKDIR $HOME/app
|
21 |
|
22 |
+
# Copy all additional files from the build context to $HOME/app recursively with correct ownership.
|
23 |
+
COPY --chown=user . $HOME/app
|
24 |
|
25 |
+
# (Optional) Debug: List all files to verify they are in place.
|
26 |
+
RUN ls -laR $HOME/app
|
27 |
|
28 |
+
# Create the conda environment using the environment file located at $HOME/app/environment.yml.
|
29 |
+
RUN conda env create -f $HOME/app/environment.yml
|
30 |
|
31 |
# Run demo.py using the 'ssgqa' conda environment.
|
32 |
CMD ["conda", "run", "--no-capture-output", "-n", "ssgqa", "python", "demo.py"]
|