Spaces:
Runtime error
Runtime error
Upload Dockerfile.yml
Browse files- Dockerfile.yml +26 -0
Dockerfile.yml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Pull python base image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Add requirements.txt to the working directory
|
5 |
+
ADD requirements.txt requirements.txt
|
6 |
+
|
7 |
+
# Update pip
|
8 |
+
RUN pip install --upgrade pip
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
+
RUN pip install -r requirements.txt
|
12 |
+
|
13 |
+
# Install ngrok
|
14 |
+
RUN apt-get update && apt-get install -y unzip \
|
15 |
+
&& curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc \
|
16 |
+
&& echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list \
|
17 |
+
&& apt-get update && apt-get install ngrok
|
18 |
+
|
19 |
+
# Copy application files
|
20 |
+
COPY app/. /app/.
|
21 |
+
|
22 |
+
# Expose port for application
|
23 |
+
EXPOSE 8001
|
24 |
+
|
25 |
+
# Start ngrok and the flask application
|
26 |
+
CMD ngrok http 8001 --log=stdout & python /app/main.py
|