5767f55686
- Added new model and scaler files to .gitignore and output directory. - Updated Dockerfile to create output/models directory. - Revised README to include instructions for using a .env file for configuration. - Enhanced config.py to load database credentials from environment variables. - Implemented model saving functionality in salary_predictor.py for consistent and inconsistent earners.
20 lines
437 B
Docker
20 lines
437 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y libpq-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install -r requirements.txt
|
|
|
|
COPY salary_analytics/ ./salary_analytics/
|
|
|
|
RUN mkdir -p output/csv output/plots output/models
|
|
|
|
ENV PYTHONPATH=/app
|
|
ENV HOST=0.0.0.0
|
|
ENV PORT=8000
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "salary_analytics.api:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] |