sanjay7178 commited on
Commit
5085f65
·
verified ·
1 Parent(s): 66dfb94

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -14,20 +14,20 @@ RUN apt-get update && apt-get install -y \
14
  cargo \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Switch to the non-root user
18
- USER user
19
-
20
  # Set up environment variables
21
- ENV PATH="/home/user/.local/bin:$PATH"
22
  ENV VIRTUAL_ENV=/home/packages/.venv
 
23
 
24
  # Set the working directory
25
  WORKDIR /app
26
 
27
- # Add the install script and run it
28
  ADD https://astral.sh/uv/install.sh /install.sh
29
  RUN chmod +x /install.sh && /install.sh && rm /install.sh
30
 
 
 
 
31
  # Copy requirements and install Python dependencies
32
  COPY ./requirements.txt .
33
  RUN /root/.cargo/bin/uv venv /home/packages/.venv
 
14
  cargo \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
17
  # Set up environment variables
 
18
  ENV VIRTUAL_ENV=/home/packages/.venv
19
+ ENV PATH="/home/user/.local/bin:$PATH"
20
 
21
  # Set the working directory
22
  WORKDIR /app
23
 
24
+ # Download and execute the install script as root
25
  ADD https://astral.sh/uv/install.sh /install.sh
26
  RUN chmod +x /install.sh && /install.sh && rm /install.sh
27
 
28
+ # Switch to the non-root user
29
+ USER user
30
+
31
  # Copy requirements and install Python dependencies
32
  COPY ./requirements.txt .
33
  RUN /root/.cargo/bin/uv venv /home/packages/.venv