SurgVLLM / Dockerfile
yaziciz's picture
Update Dockerfile
f5dd4d5 verified
FROM yaziciz/deepsurg_vllm_v1_b1
# Install system dependency required for OpenCV.
RUN apt-get update && apt-get install -y libgl1-mesa-glx
# Create a new user.
RUN useradd -m -u 1000 user
# Create the destination directory, move all files from /app (from the base image) to /home/user/app, and update ownership recursively.
RUN mkdir -p /home/user/app && \
cp -r /app/* /home/user/app/ && \
chown -R user:user /home/user/app
# Switch to the non-root user.
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Copy all additional files from the build context to $HOME/app recursively with correct ownership.
COPY --chown=user . $HOME/app
# (Optional) Debug: List all files to verify they are in place.
RUN ls -laR $HOME/app
# Create the conda environment using the environment file located at $HOME/app/environment.yml.
RUN conda env create -f $HOME/app/environment.yml
# Run demo.py using the 'ssgqa' conda environment.
CMD ["conda", "run", "--no-capture-output", "-n", "ssgqa", "python", "demo.py"]