Veritas-AI / Dockerfile
aaburakhia's picture
Update Dockerfile
9a34e27 verified
# 1. Start from an official Python base image
FROM python:3.9
# 2. Set the working directory inside the container
WORKDIR /code
# 3. Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# 4. Install the Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# 5. Download the spaCy model during the build
RUN python -m spacy download en_core_web_sm
# --- DEBUGGING STEP 1 ---
# Use spaCy's own tool to check if the model is installed correctly.
RUN python -m spacy validate
# --- END DEBUGGING STEP 1 ---
# --- DEBUGGING STEP 2 ---
# Force the system to show us the contents of the installed model directory.
# If this command fails, we know the model is not in the right place.
RUN ls -l /usr/local/lib/python3.9/site-packages/en_core_web_sm
# --- END DEBUGGING STEP 2 ---
# 6. Copy the rest of your app's files into the container
COPY . /code
# 7. Create the .streamlit directory and config file to disable telemetry
RUN mkdir -p /.streamlit
RUN echo '[browser]\ngatherUsageStats = false' > /.streamlit/config.toml
# 8. Define the command to run when the container starts
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860"]