lab / Dockerfile
andresviana's picture
My first commit!
e4c194e
raw
history blame contribute delete
803 Bytes
FROM python:3.10-slim
# Set working directory (all paths will be relative to this)
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Create writable directory for NLTK data
RUN mkdir -p /app/nltk_data && chmod a+rwx /app/nltk_data
ENV NLTK_DATA=/app/nltk_data
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download NLTK data to our writable directory
RUN python -c "import nltk; \
nltk.download('punkt', download_dir='/app/nltk_data'); \
nltk.download('punkt_tab', download_dir='/app/nltk_data')"
# Copy application code
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]