RoyAalekh commited on
Commit
48a28a4
·
1 Parent(s): 1c71ac8

Install 'uv' and configure virtual environment

Browse files

Updated the Dockerfile to install 'uv' and set up a virtual environment for the project.

Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -7,21 +7,26 @@ RUN apt-get update \
7
 
8
  WORKDIR /app
9
 
 
10
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
11
 
12
- # MAKE SURE uv is globally visible
13
- ENV PATH="/root/.local/bin:${PATH}"
14
-
15
  RUN uv venv /app/.venv
16
 
 
17
  ENV VIRTUAL_ENV=/app/.venv
18
  ENV PATH="/app/.venv/bin:${PATH}"
19
 
 
 
 
20
  COPY . .
21
 
 
22
  RUN uv pip install --upgrade pip setuptools wheel \
23
  && uv pip install .
24
 
 
25
  RUN uv --version \
26
  && which uv \
27
  && which python \
@@ -30,4 +35,4 @@ RUN uv --version \
30
 
31
  EXPOSE 8501
32
 
33
- CMD ["/app/.venv/bin/streamlit", "run", "scheduler/dashboard/app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
7
 
8
  WORKDIR /app
9
 
10
+ # Install uv
11
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
12
 
13
+ # Create uv virtual environment
 
 
14
  RUN uv venv /app/.venv
15
 
16
+ # Activate the venv in all following layers
17
  ENV VIRTUAL_ENV=/app/.venv
18
  ENV PATH="/app/.venv/bin:${PATH}"
19
 
20
+ # Make project importable
21
+ ENV PYTHONPATH="/app"
22
+
23
  COPY . .
24
 
25
+ # Install project + dependencies into venv
26
  RUN uv pip install --upgrade pip setuptools wheel \
27
  && uv pip install .
28
 
29
+ # Debug info
30
  RUN uv --version \
31
  && which uv \
32
  && which python \
 
35
 
36
  EXPOSE 8501
37
 
38
+ CMD ["streamlit", "run", "scheduler/dashboard/app.py", "--server.port=8501", "--server.address=0.0.0.0"]