simplifier / Dockerfile
Shivangguptasih's picture
Update Dockerfile
1a5a698 verified
raw
history blame
888 Bytes
Use a robust, lean Python base image
FROM python:3.10-slim
Set environment variables for non-interactive commands
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
--- Setup Directories ---
WORKDIR /app
--- Dependencies ---
Copy and install Python dependencies
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
--- Application Files ---
Copy the FastAPI application logic
COPY api.py /app/
Copy the unzipped LoRA adapter files
NOTE: Ensure you have a folder named 'simplifier_model_ft' here
containing your adapter_model.safetensors, tokenizer files, etc.
COPY simplifier_model_ft /app/simplifier_model_ft
--- Server Command ---
Expose the port used by Uvicorn
EXPOSE 8000
Command to run the Uvicorn server (FastAPI app)
'api:app' refers to the 'app' object inside the 'api.py' file.
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"]