Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- Dockerfile +40 -0
- requirements.txt +18 -0
Dockerfile
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies required for TA-Lib and other packages
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
build-essential \
|
10 |
+
wget \
|
11 |
+
unzip \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
+
# Download and install TA-Lib
|
15 |
+
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
|
16 |
+
tar -xzf ta-lib-0.4.0-src.tar.gz && \
|
17 |
+
cd ta-lib/ && \
|
18 |
+
./configure --prefix=/usr && \
|
19 |
+
make && \
|
20 |
+
make install && \
|
21 |
+
cd .. && \
|
22 |
+
rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
|
23 |
+
|
24 |
+
# Copy the requirements file into the container
|
25 |
+
COPY requirements.txt .
|
26 |
+
|
27 |
+
# Install any needed packages specified in requirements.txt
|
28 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
29 |
+
|
30 |
+
# Copy the rest of the application's code into the container
|
31 |
+
COPY . .
|
32 |
+
|
33 |
+
# Make port 8000 available to the world outside this container
|
34 |
+
EXPOSE 8000
|
35 |
+
|
36 |
+
# Define environment variable
|
37 |
+
ENV NAME World
|
38 |
+
|
39 |
+
# Run app.py when the container launches
|
40 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "app:app"]
|
requirements.txt
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Flask
|
2 |
+
vnstock
|
3 |
+
pandas
|
4 |
+
numpy
|
5 |
+
requests
|
6 |
+
matplotlib
|
7 |
+
pandas-ta
|
8 |
+
scipy
|
9 |
+
mplfinance
|
10 |
+
numpy-financial
|
11 |
+
flask-cors
|
12 |
+
google-generativeai
|
13 |
+
groq
|
14 |
+
beautifulsoup4
|
15 |
+
feedparser
|
16 |
+
newspaper3k
|
17 |
+
gunicorn
|
18 |
+
huggingface-hub
|