Arif commited on
Commit
0a83835
·
1 Parent(s): 176f1c8

Updated python for docker

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -14
Dockerfile CHANGED
@@ -1,27 +1,28 @@
1
- # Use official Python runtime
2
  FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install UV
8
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
9
 
10
- # Copy dependency files
11
  COPY pyproject.toml uv.lock ./
12
-
13
- # Install dependencies
14
- # Note: We exclude mlx here because it's Mac-only.
15
- # We install the rest of the project deps.
16
- RUN uv sync --frozen --no-install-project
17
-
18
- # Copy source code
19
  COPY src ./src
20
  COPY app ./app
21
- #COPY .env ./.env
 
 
 
 
 
 
 
 
22
 
23
- # Expose Streamlit port (Must be 7860 for HF Spaces)
24
  EXPOSE 7860
25
 
26
- # Command to run the app
27
- CMD ["uv", "run", "streamlit", "run", "app/frontend/app.py", "--server.address=0.0.0.0", "--server.port=7860"]
 
1
+ # Use python 3.10 slim image
2
  FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install uv
8
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
9
 
10
+ # Copy project files
11
  COPY pyproject.toml uv.lock ./
 
 
 
 
 
 
 
12
  COPY src ./src
13
  COPY app ./app
14
+ COPY data ./data
15
+
16
+ # CRITICAL FIX: Tell uv to use the system python (3.10) instead of downloading 3.14
17
+ ENV UV_PYTHON=python3.10
18
+
19
+ # Install dependencies
20
+ # We use --system to install into the container's global environment
21
+ # We use --no-group local to skip MLX
22
+ RUN uv sync --frozen --no-install-project --no-group local
23
 
24
+ # Expose the port Streamlit runs on
25
  EXPOSE 7860
26
 
27
+ # Run the application
28
+ CMD ["uv", "run", "streamlit", "run", "app/frontend/app.py", "--server.port=7860", "--server.address=0.0.0.0"]