Sergidev commited on
Commit
8e2efbf
·
verified ·
1 Parent(s): 611c8c3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -5
Dockerfile CHANGED
@@ -11,6 +11,9 @@ RUN apt-get update && apt-get install -y \
11
  g++ \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
 
 
14
  WORKDIR /app
15
 
16
  # Install basic Python packages first
@@ -53,8 +56,11 @@ RUN git clone -b self-lengthen https://github.com/quanshr/FastChat.git && \
53
  # Install LLaMA Factory
54
  RUN pip3 install --no-cache-dir llamafactory
55
 
56
- # Copy project files
57
- COPY . .
 
 
 
58
 
59
  # Set environment variables
60
  ENV CUDA_VISIBLE_DEVICES=0
@@ -63,11 +69,18 @@ ENV RANK=0
63
  ENV MASTER_ADDR=localhost
64
  ENV MASTER_PORT=29500
65
 
 
 
 
66
  # Create startup script
67
  RUN echo '#!/bin/bash\n\
68
- cd /app/qwen\n\
69
- bash run.sh --base_model=$MODEL_PATH --instruct_count=$INSTRUCT_COUNT --max_iter=$MAX_ITER\n\
70
- python collect_data.py' > /app/start.sh && \
 
 
 
 
71
  chmod +x /app/start.sh
72
 
73
  # Command to run
 
11
  g++ \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Create symbolic link for python
15
+ RUN ln -s /usr/bin/python3.10 /usr/bin/python
16
+
17
  WORKDIR /app
18
 
19
  # Install basic Python packages first
 
56
  # Install LLaMA Factory
57
  RUN pip3 install --no-cache-dir llamafactory
58
 
59
+ # Copy project structure
60
+ COPY qwen /app/qwen
61
+ COPY llama /app/llama
62
+ COPY eval /app/eval
63
+ COPY app.py /app/app.py
64
 
65
  # Set environment variables
66
  ENV CUDA_VISIBLE_DEVICES=0
 
69
  ENV MASTER_ADDR=localhost
70
  ENV MASTER_PORT=29500
71
 
72
+ # Create directories
73
+ RUN mkdir -p /app/qwen/results
74
+
75
  # Create startup script
76
  RUN echo '#!/bin/bash\n\
77
+ if [ "$USE_UI" = "true" ]; then\n\
78
+ python app.py\n\
79
+ else\n\
80
+ cd /app/qwen\n\
81
+ bash run.sh --base_model=$MODEL_PATH --instruct_count=$INSTRUCT_COUNT --max_iter=$MAX_ITER\n\
82
+ python collect_data.py\n\
83
+ fi' > /app/start.sh && \
84
  chmod +x /app/start.sh
85
 
86
  # Command to run