Spaces:
Paused
Paused
Update Dockerfile
Browse files- 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
|
| 103 |
-
COPY requirements.txt
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|