toxicity-detector

This commit is contained in:
2024-02-12 15:50:35 +03:00
parent ec82174dc9
commit 7fd358931a
10 changed files with 166 additions and 255 deletions

View File

@@ -1,14 +1,17 @@
FROM python:slim
WORKDIR /app
COPY . /app
RUN apt-get update && \
apt-get install -y git gcc curl && \
curl -sSL https://install.python-poetry.org | python - && \
echo "export PATH=$PATH:/root/.local/bin" >> ~/.bashrc && \
. ~/.bashrc && \
poetry config virtualenvs.create false && \
poetry install --no-dev
# Copy just the requirements file first
COPY requirements.txt .
CMD python main.py
# Install requirements
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
EXPOSE 8080
# Set the entry point
CMD ["python", "main.py"]