Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -11,6 +11,9 @@ RUN wget -q https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
|
|
| 11 |
&& tar -xzf ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin \
|
| 12 |
&& rm ngrok-v3-stable-linux-amd64.tgz
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# Create start_services.sh script
|
| 15 |
RUN echo '#!/bin/bash\n\
|
| 16 |
# Start Ollama server in the background\n\
|
|
@@ -25,13 +28,9 @@ fi\n\
|
|
| 25 |
# Pull TinyLlama model\n\
|
| 26 |
echo "Pulling TinyLlama model..."\n\
|
| 27 |
ollama pull tinyllama\n\
|
| 28 |
-
#
|
| 29 |
-
if [ -z "$NGROK_AUTHTOKEN" ]; then\n\
|
| 30 |
-
echo "Error: NGROK_AUTHTOKEN environment variable is not set"\n\
|
| 31 |
-
exit 1\n\
|
| 32 |
-
fi\n\
|
| 33 |
echo "Starting Ngrok tunnel..."\n\
|
| 34 |
-
ngrok authtoken
|
| 35 |
ngrok http 11434 --host-header="localhost:11434" &\n\
|
| 36 |
# Keep the container running\n\
|
| 37 |
wait' > /app/start_services.sh
|
|
@@ -42,8 +41,5 @@ RUN chmod +x /app/start_services.sh
|
|
| 42 |
# Expose Ollama API port
|
| 43 |
EXPOSE 11434
|
| 44 |
|
| 45 |
-
# Set environment variable for Ngrok authtoken (to be provided at runtime)
|
| 46 |
-
ENV NGROK_AUTHTOKEN "2fjNALLd8Guj8P4RCXvnvfDJ3Fp_6t8DR3vXx9U8qH69j6moY"
|
| 47 |
-
|
| 48 |
# Run the startup script
|
| 49 |
CMD ["/app/start_services.sh"]
|
|
|
|
| 11 |
&& tar -xzf ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin \
|
| 12 |
&& rm ngrok-v3-stable-linux-amd64.tgz
|
| 13 |
|
| 14 |
+
# Create /app directory
|
| 15 |
+
RUN mkdir -p /app
|
| 16 |
+
|
| 17 |
# Create start_services.sh script
|
| 18 |
RUN echo '#!/bin/bash\n\
|
| 19 |
# Start Ollama server in the background\n\
|
|
|
|
| 28 |
# Pull TinyLlama model\n\
|
| 29 |
echo "Pulling TinyLlama model..."\n\
|
| 30 |
ollama pull tinyllama\n\
|
| 31 |
+
# Set Ngrok authtoken\n\
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
echo "Starting Ngrok tunnel..."\n\
|
| 33 |
+
ngrok authtoken <your-ngrok-authtoken>\n\
|
| 34 |
ngrok http 11434 --host-header="localhost:11434" &\n\
|
| 35 |
# Keep the container running\n\
|
| 36 |
wait' > /app/start_services.sh
|
|
|
|
| 41 |
# Expose Ollama API port
|
| 42 |
EXPOSE 11434
|
| 43 |
|
|
|
|
|
|
|
|
|
|
| 44 |
# Run the startup script
|
| 45 |
CMD ["/app/start_services.sh"]
|