Skip to content

Commit

Permalink
Add Dockerfile changes and base model class
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatologist committed Dec 31, 2023
1 parent 2104e62 commit 93e6cd0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hosting/Dockerfile
Expand Up @@ -16,7 +16,7 @@ WORKDIR /app
# Copy necessary files to the container
COPY requirements.txt .
COPY main.py .
COPY download_models.py .
COPY ../models ./models

# Create a virtual environment in the container
RUN python3 -m venv .venv
Expand All @@ -25,7 +25,4 @@ RUN python3 -m venv .venv
ENV PATH="/app/.venv/bin:$PATH"

# Install Python dependencies from the requirements file
RUN pip install --no-cache-dir -r requirements.txt && \
# Get the models from Hugging Face to bake into the container
python3 download_models.py

RUN pip install --no-cache-dir -r requirements.txt
18 changes: 18 additions & 0 deletions hosting/base.py
@@ -0,0 +1,18 @@


from abc import ABC, abstractmethod

class BaseModel(ABC):

"""A model class to lead the model and tokenizer"""

def __init__(self) -> None:
pass

@abstractmethod
def load_model():
pass

@abstractmethod
def load_tokenizer():
pass
Empty file added hosting/main.py
Empty file.

0 comments on commit 93e6cd0

Please sign in to comment.