Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files5 unmodified lines678910111 unmodified line13141516171819201 unmodified line22232425262728293031325 unmodified linesENV XDG_CONFIG_HOME=/app/.streamlitENV NLTK_DATA=/app/nltk_dataRUN apt-get update && apt-get install -y \build-essential \curl \1 unmodified linegit \&& rm -rf /var/lib/apt/lists/*RUN mkdir -p /app/.streamlit /app/nltk_data && chmod -R 777 /appCOPY requirements.txt ./COPY src/ ./src/COPY src/c_d.csv ./src/1 unmodified lineCOPY src/tfidf.pkl ./src/COPY src/multilabels.pkl ./src/RUN pip install --no-cache-dir -r requirements.txtRUN python -m nltk.downloader -d /app/nltk_data punkt averaged_perceptron_tagger wordnet stopwords# Expose only for devEXPOSE 8501CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]5 unmodified lines67891011121 unmodified line141516171819202122231 unmodified line25262728293031323334353637385 unmodified linesENV XDG_CONFIG_HOME=/app/.streamlitENV NLTK_DATA=/app/nltk_data# Install system dependenciesRUN apt-get update && apt-get install -y \build-essential \curl \1 unmodified linegit \&& rm -rf /var/lib/apt/lists/*# Create necessary directoriesRUN mkdir -p /app/.streamlit /app/nltk_data && chmod -R 777 /app# Copy project filesCOPY requirements.txt ./COPY src/ ./src/COPY src/c_d.csv ./src/1 unmodified lineCOPY src/tfidf.pkl ./src/COPY src/multilabels.pkl ./src/# Install Python dependenciesRUN pip install --no-cache-dir -r requirements.txt# Only now that nltk is installed, download NLTK resourcesRUN python -m nltk.downloader -d /app/nltk_data punkt averaged_perceptron_tagger wordnet stopwords# Expose port (for dev, can remove if reverse proxying)EXPOSE 8501# Start the Streamlit appCMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
Dockerfile+8-2