mol-lang-lab / Dockerfile
alidenewade's picture
Update Dockerfile
c04ccf7 verified
raw
history blame
765 Bytes
# Use a slim Python base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt && \
find . -type d -name "__pycache__" -exec rm -rf {} +;
# Copy the Streamlit application file and the entrypoint script into the container
COPY app.py .
COPY entrypoint.sh .
# Give execution rights to the entrypoint script
RUN chmod +x entrypoint.sh
# Expose the port Streamlit runs on (default for Hugging Face Spaces is 7860)
EXPOSE 7860
# Define the entrypoint for the container
# This will execute the entrypoint.sh script when the container starts
ENTRYPOINT ["./entrypoint.sh"]