-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (37 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Use an official Python runtime as a parent image
FROM python:3.10.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies, including git
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
software-properties-common \
unzip \
git \
&& rm -rf /var/lib/apt/lists/*
# Install gdown
RUN pip install --no-cache-dir gdown
# Set work directory
WORKDIR /app/FrameFinderLE
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Download spacy language model
RUN python -m spacy download en_core_web_sm
# Download NLTK 'punkt' and 'punkt_tab' resources
RUN python -m nltk.downloader punkt punkt_tab
# Copy the download script
COPY download_files.sh .
# Make the script executable
RUN chmod +x download_files.sh
# Copy the entire project
COPY . .
# Run the download script
RUN ./download_files.sh
# Expose the port the app runs on
EXPOSE 8000
# Command to run the application with hot reloading
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]