RoyAalekh commited on
Commit
596c145
·
1 Parent(s): 028e6c8

Refactor Dockerfile for uv installation and venv setup

Browse files

Updated Dockerfile to streamline uv installation and environment setup.

Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -9,30 +9,27 @@ WORKDIR /app
9
 
10
  # Install uv
11
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
12
-
13
- # Make uv visible to shell
14
  ENV PATH="/root/.local/bin:${PATH}"
15
 
16
- # Create uv virtual environment
17
  RUN uv venv /app/.venv
18
-
19
- # Activate venv for rest of image
20
  ENV VIRTUAL_ENV=/app/.venv
21
  ENV PATH="/app/.venv/bin:${PATH}"
22
 
23
- # Make project importable
24
- ENV PYTHONPATH="/app"
25
-
26
  COPY . .
27
 
 
 
 
 
28
  RUN uv pip install --upgrade pip setuptools wheel \
29
  && uv pip install .
30
 
 
31
  RUN uv --version \
32
- && which uv \
33
- && which python \
34
  && python --version \
35
- && which streamlit
36
 
37
  EXPOSE 8501
38
 
 
9
 
10
  # Install uv
11
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
 
 
12
  ENV PATH="/root/.local/bin:${PATH}"
13
 
14
+ # Create uv venv
15
  RUN uv venv /app/.venv
 
 
16
  ENV VIRTUAL_ENV=/app/.venv
17
  ENV PATH="/app/.venv/bin:${PATH}"
18
 
19
+ # Copy project
 
 
20
  COPY . .
21
 
22
+ # IMPORTANT: ensure scheduler/ is importable ALWAYS
23
+ ENV PYTHONPATH="/app"
24
+
25
+ # Install dependencies inside venv
26
  RUN uv pip install --upgrade pip setuptools wheel \
27
  && uv pip install .
28
 
29
+ # Sanity check
30
  RUN uv --version \
 
 
31
  && python --version \
32
+ && pip list
33
 
34
  EXPOSE 8501
35