Update Dockerfile
This commit is contained in:
parent
4c0f7f32af
commit
800e5412f4
25
Dockerfile
25
Dockerfile
@ -1,2 +1,23 @@
|
|||||||
FROM semitechnologies/transformers-inference:custom
|
# Use the official Python image as a base
|
||||||
RUN MODEL_NAME=distilroberta-base ./download.py
|
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"]
|
||||||
Loading…
Reference in New Issue
Block a user