Skip to content

Commit

Permalink
chore: set up package and update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ishworrsubedii committed Sep 30, 2024
1 parent 11a1a1c commit 8fd997c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ env/
.idea
.vscode

dist

icogen_core.egg-info


12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM python:3.10-slim

# Set the working directory
WORKDIR /ico-gen

COPY icogen_core /ico-gen
COPY icogen_core /ico-gen/icogen_core
COPY main.py /ico-gen
COPY requirements.txt /ico-gen

Expand All @@ -18,6 +19,13 @@ RUN apt-get update && apt-get install -y \
RUN pip install --no-cache-dir --upgrade pip==23.0
RUN pip install --no-cache-dir -r requirements.txt

WORKDIR /ico-gen/icogen_core
COPY icogen_core/setup.py /ico-gen/icogen_core/setup.py
RUN python setup.py sdist bdist_wheel
RUN pip install dist/*.whl

WORKDIR /ico-gen

EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
30 changes: 30 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
Created By: ishwor subedi
Date: 2024-09-30
"""
from setuptools import setup, find_packages
import os


def read_requirements():
req_file = os.path.join(os.path.dirname(__file__), 'requirements.txt')
with open(req_file) as f:
return f.read().splitlines()


setup(
name="icogen_core",
version="0.1.0",
description="Icon generator core package",
author="Ishwor Subedi",
author_email="ishworr.subedi@gmail.com",
url="https://github.com/ishworrsubedii/ico-gen",
packages=find_packages(),
install_requires=read_requirements(),
classifiers=[
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.10',
)

0 comments on commit 8fd997c

Please sign in to comment.