2024-10-06 18:21:43 -07:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
2024-10-07 15:21:05 -07:00
|
|
|
|
2024-10-06 18:21:43 -07:00
|
|
|
# Function to read requirements.txt
|
|
|
|
|
def parse_requirements(filename):
|
2024-10-07 15:21:05 -07:00
|
|
|
with open(filename, "r") as file:
|
|
|
|
|
return [
|
|
|
|
|
line.strip() for line in file if line.strip() and not line.startswith("#")
|
|
|
|
|
]
|
|
|
|
|
|
2024-10-06 18:21:43 -07:00
|
|
|
|
|
|
|
|
# Call the parse_requirements function to get the list of dependencies
|
2024-10-07 15:21:05 -07:00
|
|
|
requirements = parse_requirements("requirements.txt")
|
2024-10-06 18:21:43 -07:00
|
|
|
print(f"packages to install: {find_packages()}")
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name="model_server",
|
|
|
|
|
version="0.1",
|
|
|
|
|
packages=find_packages(),
|
|
|
|
|
install_requires=requirements,
|
|
|
|
|
package_data={
|
|
|
|
|
# Specify the package and the data files you want to include
|
2024-10-07 15:21:05 -07:00
|
|
|
"app": ["/*.yaml"], # Includes all .yaml files in the config/ folder
|
2024-10-06 18:21:43 -07:00
|
|
|
},
|
|
|
|
|
entry_points={
|
2024-10-07 15:21:05 -07:00
|
|
|
"console_scripts": [
|
|
|
|
|
"model_server=app:run_server",
|
2024-10-06 18:21:43 -07:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
)
|