parth-1 commited on
Commit
bd74b58
·
verified ·
1 Parent(s): 7229c3f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -11
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
- # Use the PyTorch CUDA image
2
- FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime
3
 
4
- # Install system build tools for Unsloth
5
- RUN apt-get update && apt-get install -y \
6
- git \
7
- build-essential \
8
- && rm -rf /var/lib/apt/lists/*
 
 
9
 
10
  WORKDIR /app
11
- COPY . .
12
 
13
- # Install the ML stack
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Run the training script directly when the Space boots
17
- CMD ["/bin/bash", "-c", "python -m http.server 7860 & python grpo_train.py"]
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
 
2
 
3
+ RUN apt-get update \
4
+ && apt-get install -y --no-install-recommends curl \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ RUN useradd -m -u 1000 user
8
+ ENV USER=user
9
+ ENV HOME=/home/user
10
 
11
  WORKDIR /app
 
12
 
13
+ COPY pyproject.toml requirements.txt ./
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ COPY . .
17
+ RUN pip install --no-cache-dir --no-deps .
18
+
19
+ RUN chmod +x apps/start.sh
20
+
21
+ EXPOSE 8000
22
+
23
+ CMD ["./apps/start.sh"]