toxicity-detector
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -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"]
|
||||
|
Reference in New Issue
Block a user