Students_leaderboard / Dockerfile
Jofthomas's picture
Jofthomas HF Staff
Update Dockerfile
108c4c3 verified
raw
history blame contribute delete
647 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /code
ENV HF_HOME=/code/huggingface_cache
RUN mkdir -p $HF_HOME && \
chmod -R 777 $HF_HOME
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY ./app /code/app
COPY ./static /code/static
COPY ./index.html /code/index.html
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]