miike-ai commited on
Commit
b27c3b5
·
verified ·
1 Parent(s): d799084

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -5
Dockerfile CHANGED
@@ -99,10 +99,20 @@ exec code-server --disable-telemetry --bind-addr 0.0.0.0:8443 /workspace\n\
99
  # Expose ports
100
  EXPOSE 8443 11434
101
 
102
- # Copy any user requirements AFTER base installation
103
- COPY requirements.txt* /workspace/
104
- RUN if [ -f /workspace/requirements.txt ]; then \
105
- /opt/unsloth-env/bin/pip install -r /workspace/requirements.txt; \
106
- fi
 
 
 
 
 
 
 
 
 
 
107
 
108
  CMD ["/start.sh"]
 
99
  # Expose ports
100
  EXPOSE 8443 11434
101
 
102
+ # Copy requirements.txt to workspace (will fail build if not present)
103
+ COPY requirements.txt /workspace/requirements.txt
104
+
105
+ # Create a script to install from requirements.txt with proper environment
106
+ RUN echo '#!/bin/bash\n\
107
+ echo "Installing from requirements.txt..."\n\
108
+ source /opt/unsloth-env/bin/activate\n\
109
+ pip install -r /workspace/requirements.txt\n\
110
+ echo "Installation complete!"\n\
111
+ ' > /workspace/install-requirements.sh && \
112
+ chmod +x /workspace/install-requirements.sh
113
+
114
+ # Optional: Install requirements.txt if you want it done at build time
115
+ # Uncomment the next line if you want automatic installation
116
+ # RUN /opt/unsloth-env/bin/pip install -r /workspace/requirements.txt
117
 
118
  CMD ["/start.sh"]