burtenshaw commited on
Commit
421042b
·
1 Parent(s): b5bdc08

add uv in docker

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -1,12 +1,14 @@
1
  FROM python:3.11-slim
2
 
3
- # Install Dev Mode required packages
4
  RUN apt-get update && \
5
  apt-get install -y \
6
  bash \
7
  git git-lfs \
8
  wget curl procps \
9
- htop vim nano && \
 
 
10
  rm -rf /var/lib/apt/lists/*
11
 
12
  # Set up user with uid 1000 (required for Dev Mode)
@@ -16,18 +18,17 @@ USER user
16
  ENV HOME=/home/user \
17
  PATH=/home/user/.local/bin:$PATH
18
 
19
- # App code must be in /app for Dev Mode to detect changes
20
- WORKDIR /app
21
 
22
- # Copy application code
23
- COPY --chown=user . /app
 
24
 
25
- # Install Python dependencies (if you have any)
26
- # RUN pip install --no-cache-dir -r requirements.txt
27
 
28
- # Expose the default Spaces port
29
  EXPOSE 7860
30
 
31
- # CMD is required for Dev Mode - start a simple server placeholder
32
- # You can modify this via Dev Mode shell
33
  CMD ["python", "-m", "http.server", "7860"]
 
1
  FROM python:3.11-slim
2
 
3
+ # Install Dev Mode required packages + useful tools
4
  RUN apt-get update && \
5
  apt-get install -y \
6
  bash \
7
  git git-lfs \
8
  wget curl procps \
9
+ htop vim nano \
10
+ jq \
11
+ build-essential && \
12
  rm -rf /var/lib/apt/lists/*
13
 
14
  # Set up user with uid 1000 (required for Dev Mode)
 
18
  ENV HOME=/home/user \
19
  PATH=/home/user/.local/bin:$PATH
20
 
21
+ # Install uv
22
+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
23
 
24
+ # Pre-install useful Python packages (using uv)
25
+ RUN uv pip install --system \
26
+ requests httpx numpy pandas
27
 
28
+ WORKDIR /app
29
+ COPY --chown=user . /app
30
 
 
31
  EXPOSE 7860
32
 
33
+ # Just keep the container alive - agent uses SSH to interact
 
34
  CMD ["python", "-m", "http.server", "7860"]