NLP-PG02 / Dockerfile
Noha90's picture
fix readme change it to Bioelectra
7cd9f1e
raw
history blame contribute delete
583 Bytes
FROM python:3.9-slim
WORKDIR /app
#system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# environment variables
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_HOME=/app/cache
ENV PORT=7860
# Create cache directory and log file with proper permissions
RUN mkdir -p /app/cache && \
touch /app/log.jsonl && \
chmod 777 /app/cache /app/log.jsonl
# Copy files
COPY . .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
CMD ["python", "app.py"]