Rx_Codex_V1_Tiny_V3 / Dockerfile
Testsdft's picture
Upload 4 files
42fb1be verified
raw
history blame contribute delete
795 Bytes
# Use an official Python base image
FROM python:3.11-slim
# Set the working directory inside the container
WORKDIR /code
# Set environment variable for Hugging Face cache
ENV HF_HOME /code/.cache
# Create the cache directory and make it fully writable.
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
# Copy and install requirements
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# --- CRITICAL: Copy our custom model's code ---
COPY ./modeling_rx_codex_v3.py /code/modeling_rx_codex_v3.py
# Copy application code
COPY ./main.py /code/app.py
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]