Skip to content

Commit bb31526

Browse files
authored
Update Dockerfile
1 parent 9896a79 commit bb31526

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Dockerfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1-
# Use Python 3.9 as base image
21
FROM python:3.9
32

43
WORKDIR /wsgi
54

6-
# Copy only dependency files first to leverage Docker caching
75
COPY Pipfile Pipfile.lock /wsgi/
86

9-
# Install Pipenv and dependencies
107
RUN pip install pipenv && pipenv install --deploy --ignore-pipfile
118

12-
# Install CPU-only PyTorch (avoids CUDA errors)
139
RUN pipenv run pip install torch --index-url https://download.pytorch.org/whl/cpu
1410

15-
# Download spaCy model inside the virtual environment
1611
RUN pipenv run python -m spacy download en_core_web_sm
1712

18-
# Copy the application files
1913
COPY . /wsgi
2014

21-
# Unset HF_TOKEN to prevent conflicts
15+
# To prevent conflicts with .env
2216
ENV HF_TOKEN=""
2317

24-
# Expose the port for Flask
2518
EXPOSE 3008
2619

27-
# Run Flask
2820
CMD ["pipenv", "run", "flask", "run", "--host=0.0.0.0", "--port=3008"]

0 commit comments

Comments
 (0)