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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -12
Dockerfile CHANGED
@@ -14,24 +14,19 @@ RUN apt-get update && apt-get install -y \
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
34
- RUN /root/.cargo/bin/uv pip install --no-cache-dir -r requirements.txt
 
 
 
 
35
 
36
  # Copy the application code to the working directory
37
  COPY --chown=user . /app
 
14
  cargo \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
17
 
 
 
18
 
19
+ ENV VIRTUAL_ENV=/home/packages/.venv
20
  ADD https://astral.sh/uv/install.sh /install.sh
21
+ RUN chmod -R 655 /install.sh && /install.sh && rm /install.sh
 
 
 
22
 
 
23
  COPY ./requirements.txt .
24
  RUN /root/.cargo/bin/uv venv /home/packages/.venv
25
+ RUN /root/.cargo/bin/uv pip install --no-cache -r requirements.txt
26
+
27
+ # Set the working directory
28
+ WORKDIR /app
29
+
30
 
31
  # Copy the application code to the working directory
32
  COPY --chown=user . /app