Hassan Ali Khan commited on
Commit
11ce71e
·
1 Parent(s): 0e5a76c
Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,26 +1,24 @@
1
- # Python base (matches your local 3.13)
2
  FROM python:3.13-slim
3
 
4
- # System deps (curl for uv installer; add build tools if you need to compile wheels)
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
- curl \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
- # Install uv (Astral)
10
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
 
 
11
  ENV PATH="/root/.local/bin:${PATH}"
12
 
13
- # Workdir
14
  WORKDIR /app
15
-
16
- # Copy files
17
  COPY . .
18
 
19
- # Install deps from uv.lock (fast, reproducible)
20
- RUN uv --version && uv sync --frozen
21
 
22
- # Spaces serves on port 7860 by convention, but also provides $PORT.
23
  EXPOSE 7860
24
 
25
- # Start Chainlit (bind to 0.0.0.0). Use $PORT if provided, else 7860.
26
- CMD ["bash", "-lc", "uv run chainlit run src/study_chatbot/app.py --host 0.0.0.0 --port ${PORT:-7860}"]
 
 
1
  FROM python:3.13-slim
2
 
3
+ # Install curl and build tools
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ curl build-essential git \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Install uv
9
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh
10
+
11
+ # Add uv to PATH
12
  ENV PATH="/root/.local/bin:${PATH}"
13
 
 
14
  WORKDIR /app
 
 
15
  COPY . .
16
 
17
+ # Install dependencies
18
+ RUN uv sync --frozen
19
 
20
+ # Expose Space default port
21
  EXPOSE 7860
22
 
23
+ # Start Chainlit with uv (now on PATH)
24
+ CMD ["uv", "run", "chainlit", "run", "src/study_chatbot/app.py", "--host", "0.0.0.0", "--port", "7860"]