From 800e5412f45f8092df7854f638bad6cd4b333a0b Mon Sep 17 00:00:00 2001 From: groupuser Date: Mon, 16 Dec 2024 23:30:53 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index baed5f4..c807fd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,23 @@ -FROM semitechnologies/transformers-inference:custom -RUN MODEL_NAME=distilroberta-base ./download.py \ No newline at end of file +# Use the official Python image as a base +FROM python:3.9-slim-buster + +# Set environment variables +ENV PYTHONUNBUFFERED 1 +ENV FLASK_APP=app.py +ENV FLASK_RUN_HOST=0.0.0.0 + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file and install dependencies +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt + +# Copy the application code into the container +COPY . /app + +# Expose port 5000 to the outside world +EXPOSE 5000 + +# Run the Flask app when the container launches +CMD ["flask", "run"] \ No newline at end of file